Skip to content

Add check for missing permissions #13

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

Open
JanikCodes opened this issue Apr 12, 2024 · 12 comments
Open

Add check for missing permissions #13

JanikCodes opened this issue Apr 12, 2024 · 12 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@JanikCodes
Copy link
Owner

Some inputs can result in an error when the bot does not have enough permissions, add a check for valid permissions or find another way

@JanikCodes JanikCodes added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Apr 12, 2024
@Scarlet-2
Copy link

Scarlet-2 commented Apr 12, 2024

Hello, i am new on github and contributing and i would like to help, any place i can start looking to solve this?

@JanikCodes
Copy link
Owner Author

Yeah! Basically we need a check in every Slash Command if the bot has the required permissions.
If not, perhaps show an warning embed.

@Scarlet-2
Copy link

like a automatic message on a channel?

@JanikCodes
Copy link
Owner Author

Yeah, when ever the command is executed, instead of doing what the command should do, display an error embed.
To contribute I suggest forking this repository and once done creating a Pull Request.

@Scarlet-2
Copy link

Ok, i will have a look in the code and ask questions here if that is alright

@JanikCodes
Copy link
Owner Author

Surething! Appreciate it.

@Scarlet-2
Copy link

Do we put the bot as admin? or the is some specific permission?

@Scarlet-2
Copy link

And i am having some problems setting up the testing environment

@JanikCodes
Copy link
Owner Author

Do we put the bot as admin? or the is some specific permission?

The bot has specific permissions, you can see what permissions we needs in his invite link:
https://discord.com/oauth2/authorize?client_id=1098581527446700083&permissions=2147871745&scope=bot

@JanikCodes
Copy link
Owner Author

And i am having some problems setting up the testing environment

what's your problem?
Please have a look at our README.md

@xGurnoor
Copy link

xGurnoor commented May 9, 2024

Any more information on this? Which specific inputs result in an error?

@JanikCodes
Copy link
Owner Author

Any more information on this? Which specific inputs result in an error?

Sadly no. I just saw in the logs a while ago that an error occurred in any command, probably because someone invited the bot without ticking all permissions.

I think we have 2 options, add a permission check for every command or I think I can configure in Discord Developer Portal that the bot is required to have all permissions, not sure if that exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants