Комментарии:
for some reason it doesnt work for me, i checked a ton of times, i checked for prems everything it just doesnt work, i tried other ways too
Ответитьhow can I give permissions in on_message? a certain role?
Ответить@command.has_permissions(administrator=True)
NameError: name 'command' is not defined
please help with the error
is there also a possibility that I only get the test from the bot or admin instead of everyone? Or do you happen to know the code for it?
Ответитьis a way to await that error when a user is missing a permission?
Ответить@Anson the Developer pin please
If you want the bot to tell the user that they need a specific role and not just mention it as an error in the console, just copy paste this
@ban.error
async def ban_error(ctx, error):
if insistance(error, commands.MissingAnyRole):
await ctx.send("You are missing the roles required to execute this command")
Just replace every 'ban' you see with your own command name
Edit the message in the last line
Hey, how can I make it, that my bot only anwser to one command, if this is in a specific channel?
ОтветитьThx, i searched this option so long xD
ОтветитьAnd how do you make it check for an ID?
Ответитьis there a way I can make it so only one user can use it instead of one role(ex. if I wanted to make a role for a friend and he doesn't want anyone else to use it) is it possibly to limit the role perms so he is the only person that can use it.
Ответитьyou sound like Karl from Mr beast
ОтветитьHi,
I want to do this in a cog. but i get an error. any ideas on how to fix this,
Thanks
Hey bro when I add an event part in my code then everything works properly except which event I made.
ОтветитьHow can i make that only a single user with users or username have perms to a command?
Ответитьfor some reason my py file keeps crashing because im putting @command.has_permissions at the right spot, is it because atom is crap or something?
Ответитьi searched this video for a hours, u are my god
ОтветитьYAY thanks! U got a like.
ОтветитьI got a question. I got it to work but I wanted to add a message if the person using the command hadn't the permissions like
"You don't have the permissions to use this command"
I tried else statement but didn't work.
Edit:
I got it to work with the error command
I did it, but nothing displayed in either the channel or editor software. I use PyCharm. Anyone know how to fix this?
ОтветитьIt worked for me. Thanks :p
Ответить