예제 #1
0
        public async Task GetReportsAsync(OldGlobal g, int page = 1)
        {
            EmbedBuilder e = EmbedData.DefaultEmbed;

            EmbedFooterBuilder f = new EmbedFooterBuilder();

            f.WithText($"{EmojiIndex.Report} Reports");
            e.WithFooter(f);

            const int MAX_DESC = 1024;
            string    desc     = "";

            List <string> list         = new List <string>();
            List <string> descriptions = new List <string>();

            List <Report> reports  = g.Reports;
            List <Report> accepted = g.AcceptedReports;


            foreach (Report accept in accepted)
            {
                list.Add("**+** " + accept.ToString(Context.Account));
            }
            foreach (Report r in reports)
            {
                list.Add(r.ToString(Context.Account));
            }
            if (!list.Funct())
            {
                await ReplyAsync(embed : EmbedData.Throw(Context, "Empty collection.", "There are currently no reports.", false));

                return;
            }

            Embed q = EmbedData.GenerateEmbedList(list, page, e);

            await ReplyAsync(embed : q);
        }