Exemplo n.º 1
0
            public async Task View(CommandContext ctx)
            {
                var count = await ManageCharacter.GetCountAsync(Tables.Suggest);

                Console.WriteLine(count);
                string Text = "`Suggestions`";

                while (count > 0)
                {
                    var IssueGet = new ManageCharacter.Suggestions()
                    {
                        Entry = count - 1
                    };
                    var Issue = await ManageCharacter.GetAlls(IssueGet);

                    if (Issue != null)
                    {
                        string Solved = "Not Added";
                        if (Issue.Done == ManageCharacter.Done.yes)
                        {
                            Solved = "Done";
                        }
                        Text += $"\n`→ [{Issue.Entry}] - {Issue.Title} - [{Solved}]`";
                    }
                    count--;
                }
                var embed = new DiscordEmbedBuilder();
                var inter = ctx.Client.GetInteractivity();
                var pages = inter.GeneratePagesInEmbed(Text, SplitType.Line, embed);
                await inter.SendPaginatedMessageAsync(ctx.Channel, ctx.Member, pages);
            }
Exemplo n.º 2
0
            public async Task Solve(CommandContext ctx, int ID)
            {
                var Issue = await ManageCharacter.GetAlls(new ManageCharacter.Suggestions()
                {
                    Entry = ID
                });

                if (Issue == null)
                {
                    await ctx.RespondAsync("ID not found...");

                    return;
                }
                Issue.Done = ManageCharacter.Done.yes;
                var Emmy = new DiscordEmbedBuilder()
                {
                    Description = $"`[Done]{Issue.Title}`\n\n{Issue.Desc}"
                };

                Emmy = Emmy.WithFooter("Suggestion #" + ID);
                await ctx.RespondAsync(embed : Emmy);

                await ManageCharacter.UpdateAsync(Suggest : Issue);

                await Task.Delay(1000 * 120);

                await ManageCharacter.RemoveAsync(Issue);
            }
Exemplo n.º 3
0
            public async Task View(CommandContext ctx, int ID)
            {
                var Issue = await ManageCharacter.GetAlls(new ManageCharacter.Suggestions()
                {
                    Entry = ID
                });

                if (Issue == null)
                {
                    await ctx.RespondAsync("ID not found...");

                    return;
                }
                string Solved = "Not Added";

                if (Issue.Done == ManageCharacter.Done.yes)
                {
                    Solved = "Done";
                }
                var Emmy = new DiscordEmbedBuilder()
                {
                    Description = $"`{Issue.Title}`\n\n{Issue.Desc}"
                };

                Emmy = Emmy.WithFooter("Issue #" + ID + $" [{Solved}]");
                await ctx.RespondAsync(embed : Emmy);
            }