Esempio 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;
            }
        }
Esempio n. 2
0
            public async Task New(CommandContext ctx)
            {
                var Issue = new ManageCharacter.Suggestions();
                var r     = await Interactivity.WaitForAnswerAsync(ctx, $"**What is the title of this Suggestion? (Command name, event name or just what it is)**", channel : ctx.Channel);

                if (r == null)
                {
                    return;
                }
                Issue.Title = r.Content;
                r           = await Interactivity.WaitForAnswerAsync(ctx, $"**Describe the Suggestion**", channel : ctx.Channel);

                if (r == null)
                {
                    return;
                }
                Issue.Desc = r.Content;
                var count = await ManageCharacter.GetCountAsync(Tables.Suggest);

                Issue.Entry = count;
                await ManageCharacter.InsertAsync(Suggest : Issue);

                await ctx.RespondAsync("New Suggestion added, see it with &Suggestion `" + count + "`");
            }