#How are you supposed to know what its missing permissions on?

1 messages · Page 1 of 1 (latest)

solar willow
#

when your bot join a guild, a GuildMember is assigned to it. you can check GuildMember::permissions

tranquil pebble
#

Right, but how am I supposed to know what permission it's actually failing on?

#

It does a few things

solar willow
#

hmm, in this case you can see it is related to applying changes to a GuildMember

tranquil pebble
#

I apply roles, change nicknames, and remove roles

solar willow
#

so when you're making the call to edit, you know what permission you need, so you can try-catch .edit(), and inside you know where the problem comes from

#

i was about to say you can retrieve the failed permission from the error, but 50013 clearly doesn't look like a permission mask

teal dew
#

@tranquil pebble well, you should know what your code is doing, something with a member fails

tranquil pebble
#

I do know what it's doing, just not which part it's failing at because the error message isn't too descriptive.

No worries, I've changed the try, catch messages around for now to get better output.

teal dew
#

what are you trying to do

solar willow