public async Task AddRole(CommandContext ctx, string role, params string[] commands) { if (Permissions.CheckPrivate(ctx)) { return; } if (commands.Length == 0) { commands = new string[] { "*" }; } var mention = ctx.Member.Mention; if (Permissions.CheckCommandPermission(ctx)) { if (DiscordBot.AddRole(role, commands, ctx.Guild)) { await DiscordBot.RespondAsync(ctx, mention + ", role **" + role + "** added for * " + string.Join(", ", commands) + " *"); } else { await DiscordBot.RespondAsync(ctx, mention + ", that didn't work."); } } else { await DiscordBot.RespondAsync(ctx, mention + ", you do not have permission to do that."); } }
public async Task AddRole(CommandContext ctx, string role) { if (Permissions.CheckPrivate(ctx)) { return; } var mention = ctx.Member.Mention; if (Permissions.CheckCommandPermission(ctx)) { if (DiscordBot.AddRole(role, "*", ctx.Guild)) { await DiscordBot.RespondAsync(ctx, mention + ", role **" + role + "** added for *all commands*"); } else { await DiscordBot.RespondAsync(ctx, mention + ", that didn't work."); } } else { await DiscordBot.RespondAsync(ctx, mention + ", you do not have permission to do that."); } }