Exemplo n.º 1
0
        public async Task ListRequestQuotes()
        {
            if (QuoteHandler.RequestQuoteList.Any())
            {
                StringBuilder sb = new StringBuilder()
                                   .Append("**Request Quote List** : *Page 1*\nTo accept a quote, type **" + Guild.Load(Context.Guild.Id).Prefix + "acceptquote [id]**.\nTo reject a quote, type **" + Guild.Load(Context.Guild.Id).Prefix + "denyquote [id]**.\n```");

                QuoteHandler.SpliceRequestQuotes();
                List <string> requestQuotes = QuoteHandler.GetRequestQuotes(1);

                for (int i = 0; i < requestQuotes.Count; i++)
                {
                    sb.Append((i + 1) + ": " + requestQuotes[i] + "\n");
                }

                sb.Append("```");

                IUserMessage msg = await ReplyAsync(sb.ToString());

                QuoteHandler.RequestQuoteMessages.Add(msg.Id);
                QuoteHandler.RequestPageNumber.Add(1);

                if (QuoteHandler.RequestQuoteList.Count > 10)
                {
                    await msg.AddReactionAsync(Extensions.Extensions.ArrowRight);
                }
            }
            else
            {
                await ReplyAsync("There are currently 0 pending request quotes.");
            }
        }