예제 #1
0
        public async Task DisableLeveling(CommandContext ctx, [Description("Whether or not to delete all leveling data for this server")] bool deleteData)
        {
            if (!LevelingData.Servers.ContainsKey(ctx.Guild.Id))
            {
                await ctx.RespondAsync("Leveling is not enabled for this server.\nUse `%enableleveling` if you wish to enable it.");

                return;
            }
            LevelingData.RemoveServer(ctx.Guild.Id, deleteData);
        }
예제 #2
0
        public async Task EnableLeveling(CommandContext ctx)
        {
            if (LevelingData.Servers.ContainsKey(ctx.Guild.Id))
            {
                await ctx.RespondAsync("Leveling is already enabled for this server.\nUse `%disableleveling` if you wish to disable it.");

                return;
            }
            LevelingData.AddServer(ctx.Guild.Id);
            DiscordEmbedBuilder eb = new DiscordEmbedBuilder();

            eb.WithTitle("Leveling Enabled");
            eb.WithDescription("You have enabled leveling for this server. Here are some tips to help you customize the experience!");
            eb.AddField("Useful Commands", $"`addnoxpchannel`: Blacklists a channel from earning XP. Useful for hidden channels and/or places such as meme chats or bot channels.\n`setlevelupchannel`: Redirects level-up messages to a specific channel. Can be used to keep chat cleaner.\n`addlevelrole`: Adds a role reward for users who reach a certain level.\nSee `{Data.Database.GetOrCreateGuildData(ctx.Guild.Id).GuildPrefix}help leveling` for a full list of commands.");
            await ctx.RespondAsync(embed : eb.Build());
        }