how to make a command that only works for a certain role in a certain channel, otherwise it sends them a message to ask for a role

Solution 1:

I suggest not using commands.has_any, because you need to use on_command_error which is not the nicest thing. You should check if. a certain role is in the author if special_user_id in [role.id for role in ctx.author.roles]