public async Task SidebarRole(CommandContext ctx, [RemainingText] DiscordRole role) { if (role == null) { return; } await ctx.TriggerTypingAsync(); if (role.IsHoisted) { await role.UpdateAsync(hoist : false); await ctx.RespondAsync($"Role {role.Name} is now **hidden**"); } else { await role.UpdateAsync(hoist : true); await ctx.RespondAsync($"Role {role.Name} is now **displayed**"); } }
public async Task MentionRole(CommandContext ctx, [RemainingText] DiscordRole role) { if (role == null) { return; } await ctx.TriggerTypingAsync(); if (role.IsMentionable) { await role.UpdateAsync(mentionable : false); await ctx.RespondAsync($"Role **{role.Name}** is now **not-mentionable**"); } else { await role.UpdateAsync(mentionable : true); await ctx.RespondAsync($"Role **{role.Name}** is now **mentionable**"); } }