Exemplo n.º 1
0
        public async Task Oracle([Remainder] string question)
        {
            var teller = new[] { "Seer", "Fortune Teller" }.Random();
            var sprite    = Sprites.GetImageFromName(teller);
            var beginning = teller == "Seer" ? "Hoolabaloo! Ballabahoo! Hoolabaloola! I can see it clearly... " : "I see... ";
            var response  = oracleResults.Random();

            if (!question.EndsWith('?'))
            {
                _ = ReplyAsync(embed: new EmbedBuilder()
                               .WithDescription("So, you'd like to hear your fortune, would you?")
                               .WithAuthor(teller, sprite)
                               .Build());
                return;
            }
            _ = ReplyAsync(embed: new EmbedBuilder()
                           .WithDescription(beginning + response)
                           .WithAuthor(teller, sprite)
                           .Build());

            if (teller == "Seer" && response.Contains("spirits"))
            {
                _ = GoldenSun.AwardClassSeries("Air Seer Series", Context.User, Context.Channel);
            }
            await Task.CompletedTask;
        }
Exemplo n.º 2
0
 private static async Task Client_ReactionAdded(Cacheable <IUserMessage, ulong> Message, ISocketMessageChannel Channel, SocketReaction Reaction)
 {
     if (Reaction.Emote.Name == "hard_nut" && lastMessageWasNuts)
     {
         await GoldenSun.AwardClassSeries("Crusader Series", (SocketGuildUser)Reaction.User, (SocketTextChannel)Reaction.Channel);
     }
 }
Exemplo n.º 3
0
        public async Task RandomQuote([Remainder] string name = "")
        {
            if (Quotes.GetQuotesCount() == 0)
            {
                await NoQuotes();

                return;
            }

            var embed = new EmbedBuilder();

            embed.WithColor(Colors.Get("Iodem"));

            var q = Quotes.quoteList.Random();

            if (!name.IsNullOrEmpty())
            {
                q = Quotes.quoteList.Where(q => q.name.Equals(name, StringComparison.OrdinalIgnoreCase)).Random();
                if (q.name.IsNullOrEmpty())
                {
                    embed.WithDescription(Utilities.GetAlert("No_Quote_From_Name"));
                    await ReplyAsync(embed : embed.Build());

                    return;
                }
            }

            q.name = Utilities.ToCaps(q.name);

            embed.WithAuthor(q.name);
            embed.WithThumbnailUrl(Sprites.GetImageFromName(q.name));
            embed.WithDescription(q.quote);
            if (q.quote.Contains(@"#^@%!"))
            {
                var userAccount = UserAccounts.GetAccount(Context.User);
                await GoldenSun.AwardClassSeries("Curse Mage Series", Context.User, Context.Channel);
            }

            await Context.Channel.SendMessageAsync("", false, embed.Build());

            //await embed.WithDescription(Utilities.GetAlert("quote"));
        }