Answer the question
In order to leave comments, you need to log in
How to fix a bug with issuing a role in a python discord bot?
There is a server and there when you write a command the role should be given.
Throws the error
discord.ext.commands.errors.MissingRequiredArgument: self is a required argument that is missing.
@bot.command()
async def PasL134(ctx, self):
author = ctx.message.author
guild = self.get_guild(тут айди сервера)
role = guild.get_role(тут айди роли)
await author.add_roles(role)
await message.channel.send(f"{author.mention}, пасхальная роль выдана!")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question