sylveon / discord-ban-appeals

Sample ban appeals page with OAuth2 integration
https://discord-ban-appeal-preview.netlify.app/
MIT License
140 stars 48 forks source link

feat: Remove Eris from dependencies #83

Closed yoggys closed 3 months ago

yoggys commented 3 months ago

This PR removes Eris from dependencies - it is not needed, additional verification of the token and the validity of the ban permissions / channel is done by two simple fetch.

netlify[bot] commented 3 months ago

Deploy request for discord-ban-appeal-preview pending review.

Visit the deploys page to approve it

Name Link
Latest commit 632fe38e3c14723dc5a3aea905d2e0918630e6f1
sylveon commented 3 months ago

Unfortunately to use the create message endpoint, the bot has to connect to the gateway at least once. That's why eris is used.

yoggys commented 3 months ago

Unfortunately to use the create message endpoint, the bot has to connect to the gateway at least once. That's why eris is used.

Is that still a thing? I was able to send messages in a new created bot without connecting to gateway:

image

curl --location 'https://discord.com/api/v9/channels/CHANNEL_ID/messages' \
--header 'Content-Type: application/json' \
--header 'Authorization: BOT_TOKEN' \
--data '{"content": "test"}'

[!IMPORTANT]
edit: You used to have to connect to the gateway at least once to do that, but because of http-only interactions they removed it

sylveon commented 3 months ago

Ah, I have not kept up with the new discord stuff. That's great news, it always felt a bit sketch to connect the bot in CI.

Thanks for the contributions!