Skip to content

feat: SetWebhookUtil component #517

Description

@KnorpelSenf

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    choreModifies or is related to tooling, configuration, or setup.help wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions