MoT3rror / egginc-coop-tracker

0 stars 1 forks source link

Feature: Discord Slash Commands #12

Open MoT3rror opened 3 years ago

MoT3rror commented 3 years ago

https://discord.com/developers/docs/interactions/slash-commands

ayavilevich commented 3 years ago

I can probably do this

MoT3rror commented 3 years ago

Let me know if you need me to set the interactions URL or do you plan to use the INTERACTION_CREATE gateway event. Either works for me

ayavilevich commented 3 years ago

monitoring: https://github.com/discordjs/discord.js/issues/5103 https://github.com/discordjs/discord.js/pull/5106 https://github.com/discord/discord-api-docs/issues/2490

ayavilevich commented 3 years ago

in PHP: "socialiteproviders/discord": "^2.0" https://socialiteproviders.com/Discord/#installation-basic-usage

config setup: config/services.php app/Providers/EventServiceProvider.php app/Http/Controllers/Discord.php js -> routes/api.php -> app/Http/Controllers/Api/DiscordMessage.php -> [individual handler] -> js

ayavilevich commented 3 years ago

we should wait for the discordjs library (that we already use) to implement "slash commands". No point in doing the wrapper ourselves just to refactor later. I believe they will do it using the web socket gateway, they support this today, so there will be no need to create additional callback urls.

MoT3rror commented 3 years ago

Still waiting on Discord. Thanks for looking into it.