Ask coding questions

← Back to all posts
How can I make the bot give me a certain role when I type the command for it?
Popzular (2)

need help. dont know what

ErrorNoInternet (13)

You need to specify a role first, then add the role to the user.
Example code:

adminRole = discord.utils.get(, name = "Admin")

ErrorNoInternet (13)

@Popzular Nothing else is missing, please note that you need a role on your server called "Test" for the command to work. I don't know how to create roles as a bot, but I think its:
await client.create_role(, name="role name")