bot that only responds to certain roles discord.py code example
Example: bot that only responds to certain roles discord.py
if message.content.lower().startswith('/role'):
user = message.author
if message.channel.is_private or discord.utils.get(user.roles, name="admin") is None:
return
role = discord.utils.get(user.server.roles, id="437923291047526402")
await client.add_roles(user, role)