Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #bot #responds #roles
ADD COMMENT
Topic
Name
4+2 =