Esempio n. 1
0
        public async Task RequestToAddQuote([Remainder] string quote = null)
        {
            if (Guild.Load(Context.Guild.Id).QuotesEnabled)
            {
                int userLevel             = User.Load(Context.User.Id).Level;
                int quoteLevelRequirement = Configuration.Load().QuoteLevelRequirement;

                if (userLevel < quoteLevelRequirement)
                {
                    await ReplyAsync(Context.User.Mention + ", you need to be level " + quoteLevelRequirement + "+ to add a quote request.");

                    return;
                }

                if (quote == null)
                {
                    await ReplyAsync("**Syntax:** " +
                                     Guild.Load(Context.Guild.Id).Prefix + "requestquote [quote]\n" +
                                     "**Alias:** " + Guild.Load(Context.Guild.Id).Prefix + "buyquote [quote]\n```" +
                                     "**Information:**\n" +
                                     "-----------------------------\n" +
                                     "• Your quote will not be added instantly to the list. A staff member must first verify that it is safe to put on the list.\n" +
                                     "```");

                    return;
                }

                RequestQuote.AddRequestQuote(quote, Context.User.Id, Context.Guild.Id);

                await ReplyAsync(Context.User.Mention + ", your quote has been added to the list, and should be verified by a staff member shortly.");

                await Configuration.Load().LogChannelId.GetTextChannel().SendMessageAsync("**New Quote**\nQuote requested by: **" + Context.User.Mention + "**\nQuote: " + quote);

                await Guild.Load(Context.Guild.Id).LogChannelID.GetTextChannel().SendMessageAsync("**New Quote**\n" + quote + "\n\n*Do " + Guild.Load(Context.Guild.Id).Prefix + "listrequestquotes to view the ID and other quotes.*");
            }
            else
            {
                await ReplyAsync("Quotes are currently disabled. Try again later.");
            }
        }