bot that only responds to certain roles discord py

Solutions on MaxInterview for bot that only responds to certain roles discord py by the best coders in the world

showing results for - "bot that only responds to certain roles discord py"
Isiah
04 Feb 2019
1if message.content.lower().startswith('/role'):
2    user = message.author
3
4    if message.channel.is_private or discord.utils.get(user.roles, name="admin") is None:
5        return
6
7    role = discord.utils.get(user.server.roles, id="437923291047526402")
8    await client.add_roles(user, role)
9
similar questions