public async Task View(CommandContext ctx) { var count = await ManageCharacter.GetCountAsync(Tables.Issues); Console.WriteLine(count); string Text = "`Issues`"; while (count > 0) { var IssueGet = new ManageCharacter.Issues() { Entry = count - 1 }; var Issue = await ManageCharacter.GetAll(IssueGet); if (Issue != null) { string Solved = "Unsolved"; if (Issue.Solved == ManageCharacter.Solved.yes) { Solved = "Solved"; } 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); }
public async Task New(CommandContext ctx) { var Issue = new ManageCharacter.Issues(); var r = await Interactivity.WaitForAnswerAsync(ctx, $"**What is the title of this issue? (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 Issue and how it happened.**", channel : ctx.Channel); if (r == null) { return; } Issue.Desc = r.Content; var count = await ManageCharacter.GetCountAsync(Tables.Issues); Issue.Entry = count; await ManageCharacter.InsertAsync(Issue : Issue); await ctx.RespondAsync("New Issue added, see it with &issue `" + count + "`"); }