#How are you supposed to know what its missing permissions on?
1 messages · Page 1 of 1 (latest)
when your bot join a guild, a GuildMember is assigned to it. you can check GuildMember::permissions
Right, but how am I supposed to know what permission it's actually failing on?
It does a few things
hmm, in this case you can see it is related to applying changes to a GuildMember
I apply roles, change nicknames, and remove roles
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
50013 is the error "missing permissions"
@tranquil pebble well, you should know what your code is doing, something with a member fails
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.
what are you trying to do
i guess you could spice up you code by adding wrappers, which throws more descriptive errors