I'm making a discord bot with discord.py, and I have a say command, but you can make the bot mention any role. I have already stopped it from mentioning @everyone and @here, but I can't figure out how to stop it from mentioning roles. Here's the code
async def say(ctx, *, message=None):
message = message or "You have to type a message"
message_components = message.split()
if "@everyone" in message_components or "@here" in message_components:
await ctx.send("You can not ping everyone")
return
await ctx.message.delete()
await ctx.send(message)