Skip to content

Instantly share code, notes, and snippets.

@jinwoo-lee-github
Last active April 23, 2022 03:31
Show Gist options
  • Save jinwoo-lee-github/90e8f88f792552d7f066e8a36de1cb23 to your computer and use it in GitHub Desktop.
Save jinwoo-lee-github/90e8f88f792552d7f066e8a36de1cb23 to your computer and use it in GitHub Desktop.
add role
var bot = Context.Guild.GetUser(0);
Log.Information(roleToSelect.Permissions.ToString());
if (bot.Roles.Contains(roleToSelect) == false)
{
Log.Debug("has permession");
await bot.AddRoleAsync(roleToSelect);
}
else
{
Log.Debug("has not permession");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment