Discord bot role

Hello there glitch community! Thanks to all of you I’ve managed to make myself a decent bot, now my last request and last question is, does anybody know how to make a command that then gives you a role? For example I use the command +test and the bot gives me the Administrator role (in my own server, of course)

You basically add roles by adding the RoleId for the role you want to the member.rolls collection of the member you want. You should be able to use a couple of hard coded values for your test (use some roll other than admin of course).

Ultimately you may want to move that functionality away from message commands and onto slash commands instead. Message commands are on their way to being discontinued.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.