Example #1
0
        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**");
            }
        }
Example #2
0
        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**");
            }
        }