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

Feature Request: Add support for webhooks, particularly for Discord #148

Open
dshepsis opened this issue Feb 19, 2022 · 0 comments
Open

Comments

@dshepsis
Copy link

Webhooks would allow external services to receive messages about events on speedruncom. For example, a website could receive a callback whenever a new run is submitted, or whenever the rules are changed for a particular game and category. This avoids the need to make periodic requests to the API to check if changes have occurred.

Relatedly, Discord offers support for Webhooks, which is documented here: https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks
and here: https://discord.com/developers/docs/resources/webhook.

If webhooks formatted for Discord were supported, a speedrunning-community Discord server could easily create a channel to which messages are sent whenever specified events occur on their speedruncom leaderboard. This wouldn't require any coding or creating/operating a bot. I think it could also reduce load on speedruncom's servers, since bots wouldn't need to make periodic requests for such updates.

For implementation, I imagine webhooks would be implemented both for games and for users. For game webhooks, they would be enabled and configured in the /editgame page, as an extra tab. Game moderators would be able to create multiple webhooks for the same game. For each webhook, they would provide a URL (such as those generated by Discord when creating a webhook in a guild text channel) to which speedruncom would send messages. They would then have a list of checkboxes corresponding to which messages they would like to receive at that URL. For example, there would be options for:

  • New submissions (in the verification queue)
  • Newly verified submissions
  • New personal bests
  • New world records
  • New run comments
  • New categories
  • Edits to existing submissions
  • Changes to game rules
  • Changes to category rules

Each type of message could itself have some configuration, such as customizing the message sent.

User webhooks would be similar, except specific to a user. This would be useful if a user wanted to have updates posted to their personal Discord server. They would be configured in the user /settings page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant