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 Suggestions #42

Closed
Galaxy-Coding opened this issue Dec 16, 2021 · 3 comments
Closed

Feature Suggestions #42

Galaxy-Coding opened this issue Dec 16, 2021 · 3 comments

Comments

@Galaxy-Coding
Copy link

I have 3 suggestions:

  • Use a captcha service to prevent spam
  • Make the message send a message in a channel that includes a button interaction. When the button is pressed, the user is unbanned
  • When a user is unbanned by a moderator (by pressing the button), the bot uses the guilds.join scope to add the user to the server.
@sylveon
Copy link
Owner

sylveon commented Dec 18, 2021

Use a captcha service to prevent spam

This is tracked by #12

Make the message send a message in a channel that includes a button interaction. When the button is pressed, the user is unbanned

This is a thing since #37 has been merged

When a user is unbanned by a moderator (by pressing the button), the bot uses the guilds.join scope to add the user to the server.

Since this bot cannot use a database, we would have to store the banned user's token in the unban link, giving all mods access to the user's account with that scope by reading the link. This would be a security vulnerability.

@sylveon sylveon closed this as completed Dec 18, 2021
@Galaxy-Coding
Copy link
Author

Galaxy-Coding commented Feb 1, 2022

@sylveon It’s been a while, sorry.
I don’t think you have to store the user’s token in the unban link, just their ID. I’m not 100% sure about this.
See the discord.js documentation for GuildMemberManager#add()

@sylveon
Copy link
Owner

sylveon commented Feb 1, 2022

If you check the raw API, you'll notice an access token is needed: https://discord.com/developers/docs/resources/guild#add-guild-member

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

2 participants