Exemplo n.º 1
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.º 2
0
            public async Task Solve(CommandContext ctx, int ID)
            {
                var count = await ManageCharacter.GetCountAsync(Tables.Issues);

                if (ID > count)
                {
                    await ctx.RespondAsync("I don't have that many errors asshole-");

                    return;
                }
                var Issue = await ManageCharacter.GetAll(new ManageCharacter.Issues()
                {
                    Entry = ID
                });

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

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

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

                await ManageCharacter.UpdateAsync(Issue : Issue);

                await Task.Delay(1000 * 120);

                await ManageCharacter.RemoveAsync(Issue);
            }