I am using discord.py to write a discord bot for my server and was wondering how to message to the server when someone doesnt have the correct permissions to execute the command
Im using the decorators:
@client.command()
@commands.has_any_role("Administrator", "BOT SQUAD")
and obviously when I run the command with my test account, it gives an error that says that it doesnt have permissions which is normal
What Im looking to do is make it so that when this error occurs, instead of printing out in the logs that the user doesnt have permissions, it tells the user in the channel he messaged in or even private messages them saying that they dont have the permissions to execute the command.
Im new to discord.py and so i have no idea how to implement this. I have looked all through the documentation and this has not helped me nor has any other question ive looked at.
If anyone could help me to do this then that would be perfect. Bonus Points if you keep the decorators ive already got as thats the only way I know how to implement seperate roles for functions at the moment!