B
B
BANmrP2021-12-05 14:54:00
C++ / C#
BANmrP, 2021-12-05 14:54:00

Discord.NET how to grant a user a role?

I was coding my discord bot and wanted to add a feature to give the user a specific role, for example you are a player in a game and you enter a "cheat code" which grants you the cheater role. How can i do this? Thanks for the help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vindicar, 2021-12-05
@BANmrP

Get the desired user object, then call AddRoleAsync() on it ?
Without the code, there will be no detailed answer.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question