Skip to content Skip to sidebar Skip to footer

How To Say What Permission A User Is Missing Discord.py

Ive got a command which requires a specific permission and i want to say what permission a user is missing (if they dont have the permission). How do i do that. Also i know that {m

Solution 1:

Take a look at the docs. There is an attribute that will return a list of the permissions that are needed.

discord.Embed(description=f":x: You need {', '.join(error.missing_perms)} permission(s) to run this command", color = 0xff0000)

FYI, I put the string as a description since emojis don't work in the title :)

Post a Comment for "How To Say What Permission A User Is Missing Discord.py"