-
-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Due to Discord's new "Application Commands", you can create slash commands, that respond with an ephemeral message.
So a requester would enter e.g. /request developer or /request broadcaster or /request game, where "developer", "broadcaster" and "game" can be "choices" (like enums) according to Discord's docs: https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
The bot would e.g. respond with a generated link, to link your Twitch account with OAuth2.
It would be beneficial to use an ephemeral message as only the requester can see this, but it is send directly in the channel, to command was executed in.
The requester does not need to have DMs open.
A state should be used, e.g. the Discord ID, which gets signed with a private key to avoid allowing people to link random accounts.
Flow would be:
User executes command in Discord chat --> Bot sends a verification link as an ephemeral message with the signed Discord id --> User authorizes Bot via Twitch OAuth2