Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: SetWebhookUtil component #517

Open
KnorpelSenf opened this issue Oct 2, 2022 · 1 comment
Open

feat: SetWebhookUtil component #517

KnorpelSenf opened this issue Oct 2, 2022 · 1 comment
Labels
chore Modifies or is related to tooling, configuration, or setup. hacktoberfest Good issue for hacktoberfest contributors :) help wanted Extra attention is needed

Comments

@KnorpelSenf
Copy link
Member

It would be awesome to have a tiny utility component which can be included in all the hosting guides which require a webhook to be set. While it is not hard for many users to correctly set the webhook URL using curl or other tools, some beginners struggle with understanding which URL to fetch.

It would be nice to have a small interactive component on the website which lets users paste their token and URL and then it will set the webhook for them. It could also get some neat information to validate the info:

  1. Call getMe with the token to confirm the bot name
  2. Pass the URL to the URL constructor to validate the URL
  3. Display information from getWebhookInfo so that there is an easy way to confirm that things are working correctly
  4. Provide a tooltip that explains that the bot token will never be used for anything else than setting for this component to function, and tell users to never give away their token to anyone, no matter how polite a website asks.
  5. Have a link that opens the chat with the new bot in a new tab so that users can easily head over to Telegram when the webhook was set and the bot is working.
  6. Perhaps have a second button to delete the webhook again? This might not be necessary, but it could be that it feels more natural to have it. Sometimes people feel the urge to clean up after themselves.
  7. Perhaps store the token locally in the browser so that it persists across page loads? We must not do this if it feels shady, I don't want anyone to believe we store the token server-side (even though we will never do this)
@KnorpelSenf KnorpelSenf added help wanted Extra attention is needed chore Modifies or is related to tooling, configuration, or setup. labels Oct 2, 2022
@Loskir
Copy link
Contributor

Loskir commented Oct 2, 2022

I’ve had this idea before, it would be really useful

This website inspired me: resetbot.com

One more idea: ability to pass placeholders via query params. For example, example.com/?url=<project_name>.deno.dev would open a page with deno.dev part filled in
Templates with custom arguments would be great too, but it is not trivial to implement

@roziscoding roziscoding added the hacktoberfest Good issue for hacktoberfest contributors :) label Oct 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Modifies or is related to tooling, configuration, or setup. hacktoberfest Good issue for hacktoberfest contributors :) help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants