I’ve only seen no solutions for this, but im trying to check if the role of the user that sent the message is a DJ, if so then skip = True however i keep getting this error message
async def skip(self, ctx, user: discord.Member):
role = discord.utils.find(lambda r: r.name == 'DJ', ctx.message.guild.roles)
if role in user.roles:
skip = True
>Solution :
If you want to access the user that invoked the command use ctx.author:
async def skip(self, ctx):
role = discord.utils.find(lambda r: r.name == 'DJ', ctx.message.guild.roles)
if role in ctx.author.roles:
skip = True