コード例 #1
0
        public async Task Card(CommandContext ctx, params string[] attr)
        {
            var attrList = attr.OfType <string>().ToList();

            bool gold = false;

            if (attrList.Contains("Golden"))
            {
                gold = true;
                attrList.Remove("Golden");
            }

            var cardName = string.Join(" ", attrList.ToArray());

            var card      = CardHelper.GetCardInfo(cardName);
            var cardImage = CardHelper.GetCardImage(card, gold);

            await ctx.Channel.SendMessageAsync(cardImage);
        }