Ejemplo n.º 1
0
        public async Task SetChannelAsync(CommandContext ctx, [Description("Channel")] DiscordChannel ch = null)
        {
            ch = ch ?? ctx.Channel;
            async Task suicide(string why = "")
            {
                await ch.SendMessageAsync($"{why ?? ""} Stopping;");
            };
            var r = await Interactivity.WaitForAnswerAsync(ctx, $"**`What Category does this channel belong to?`**", channel : ctx.Channel);

            if (r == null)
            {
                await suicide();

                return;
            }
            switch (r.Content.ToLower())
            {
            case "rp":
                var sr = await Interactivity.WaitForAnswerINTAsync(ctx, $"**`What is the base XP gained from this channel?`**", channel : ctx.Channel);

                await ManageCharacter.InsertChannel(ch.Id, ChannelCategory.Rp, sr);

                await ctx.RespondAsync($"{ch.Mention} is now an `RP` channel;");

                return;

            case "chat":
                await ManageCharacter.InsertChannel(ch.Id, ChannelCategory.Chat, 0);

                await ctx.RespondAsync($"{ch.Mention} is now an `Chat` channel;");

                return;

            case "bot":
                await ManageCharacter.InsertChannel(ch.Id, ChannelCategory.Bot, 0);

                await ctx.RespondAsync($"{ch.Mention} is now an `Bot` channel;");

                return;
            }
        }