minecraft_discord_py icon indicating copy to clipboard operation
minecraft_discord_py copied to clipboard

Add check for missing permissions

Open JanikCodes opened this issue 1 year ago • 12 comments

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 avatar Apr 12 '24 19:04 JanikCodes

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

Scarlet-2 avatar Apr 12 '24 20:04 Scarlet-2

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

JanikCodes avatar Apr 12 '24 21:04 JanikCodes

like a automatic message on a channel?

Scarlet-2 avatar Apr 12 '24 21:04 Scarlet-2

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.

JanikCodes avatar Apr 12 '24 21:04 JanikCodes

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

Scarlet-2 avatar Apr 12 '24 21:04 Scarlet-2

Surething! Appreciate it.

JanikCodes avatar Apr 12 '24 21:04 JanikCodes

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

Scarlet-2 avatar Apr 14 '24 23:04 Scarlet-2

And i am having some problems setting up the testing environment

Scarlet-2 avatar Apr 14 '24 23:04 Scarlet-2

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 avatar Apr 15 '24 09:04 JanikCodes

And i am having some problems setting up the testing environment

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

JanikCodes avatar Apr 15 '24 09:04 JanikCodes

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

xGurnoor avatar May 09 '24 01:05 xGurnoor

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.

JanikCodes avatar May 09 '24 06:05 JanikCodes