コード例 #1
0
ファイル: BlackjackManager.cs プロジェクト: mugSans/Miki
        public Embed CreateEmbed(EventContext e)
        {
            string explanation = e.GetResource("miki_blackjack_explanation");

            return(new EmbedBuilder()
            {
                Author = new EmbedAuthorBuilder()
                {
                    Name = e.GetResource("miki_blackjack") + " | " + e.Author.Username,
                    IconUrl = e.Author.GetAvatarUrl(),
                    Url = "https://patreon.com/mikibot"
                },
                Description = $"{explanation}\n{e.GetResource("miki_blackjack_hit")}\n{e.GetResource("miki_blackjack_stay")}"
            }.AddField(e.GetResource("miki_blackjack_cards_you", Worth(player)), player.Print(), true)
                   .AddField(e.GetResource("miki_blackjack_cards_miki", Worth(dealer)), dealer.Print(), true).Build());
        }
コード例 #2
0
        public EmbedBuilder CreateEmbed(EventContext e)
        {
            string explanation = e.Locale.GetString("miki_blackjack_explanation");

            CardHand Player = GetPlayer(e.Author.Id);
            CardHand Dealer = GetPlayer(0);

            return(new EmbedBuilder()
            {
                Author = new EmbedAuthor()
                {
                    Name = e.Locale.GetString("miki_blackjack") + " | " + e.Author.Username,
                    IconUrl = e.Author.GetAvatarUrl(),
                    Url = "https://patreon.com/mikibot"
                },
                Description = $"{explanation}\n{e.Locale.GetString("miki_blackjack_hit")}\n{e.Locale.GetString("miki_blackjack_stay")}"
            }.AddField(e.Locale.GetString("miki_blackjack_cards_you", Worth(Player)), Player.Print(), true)
                   .AddField(e.Locale.GetString("miki_blackjack_cards_miki", Worth(Dealer)), Dealer.Print(), true));
        }
コード例 #3
0
ファイル: BlackjackManager.cs プロジェクト: drogs/Miki
 public IDiscordEmbed CreateEmbed(EventContext e)
 {
     return(Utils.Embed
            .SetAuthor(e.GetResource("miki_blackjack") + " | " + e.Author.Username, e.Author.AvatarUrl, "https://patreon.com/mikibot")
            .SetDescription(e.GetResource("miki_blackjack_explanation") + "\n" +
                            e.GetResource("miki_blackjack_hit") + "\n" + e.GetResource("miki_blackjack_stay"))
            .AddInlineField(e.GetResource("miki_blackjack_cards_you", Worth(player)), player.Print())
            .AddInlineField(e.GetResource("miki_blackjack_cards_miki", Worth(dealer)), dealer.Print()));
 }