Adding a user to role/guild?
Hey i want to make a bot that remove a role from a user and give it a new one.
But i dont know the "command?" for it.
To create a message on discord i found...
chan.CreateMessage(_client, "Message example");​


But how to add a member to a role.

I know on the Extension Site are these hooks but no "events" (or what is it called?).

Thanks if you can help me :)
Here are some methods I wrote to handle Adding / Removing roles for discord. I haven't tested that these work but should give you an idea on how to do it.

        [HookMethod("AddRoleToUser")]
        public void AddRoleToUser(string userId, string roleId)
        {
            Role role = _client.DiscordServer.roles.FirstOrDefault(r => r.id == roleId);
            if (role == null)
            {
                PrintWarning($"Tried to add a role to use which doesn't exist: '{roleId}'");
                return;
            }

            _client.DiscordServer.AddGuildMemberRole(_client, userId, roleId);
        }

        [HookMethod("RemoveRoleFromUser")]
        public void RemoveRoleFromUser(string userId, string roleId)
        {
            Role role = _client.DiscordServer.roles.FirstOrDefault(r => r.id == roleId);
            if (role == null)
            {
                PrintWarning($"Tried to remove a role to use which doesn't exist: '{roleId}'");
                return;
            }

            _client.DiscordServer.RemoveGuildMemberRole(_client, userId, roleId);
        }​
Thanks :)
Is there a Site where i found more functions like delete a message?
In response to BattleSheep ():
Thanks :)
Is there a Site where i found more functions like delete a message?
You could take a look at the source code of the extension or use visual studio and add it (extension dll) as a reference so it will automatically suggest things for you while typing
In response to Slydelix ():
You could take a look at the source code of the extension or use visual studio and add it (extension...
Today u try to add a role but it didnt work everytime e get the message that it couldnt add the role or otherwise that the role did not exist.

can you explain or give a example how to define the role? the role is a id like 50890322857XXXXXX6 i but it did not work, yes it is the right id and i use the following call.

string roleId = "5089032285XXXXXX96";
AddRoleToUser(author.id.ToString(), roleId);​
Or i dont need to conver the author.id to string?