예제 #1
0
        public async Task SearchPlayerAsync([Remainder] string player_tag)
        {
            PlayerDetail selectedPlayer = null;

            try
            {
                selectedPlayer = await _clashClient.Players.GetAsync(player_tag);
            } catch (ClashOfClansException ex)
            {
                Console.WriteLine(ex.Error);
            }

            if (selectedPlayer == null)
            {
                await ReplyAsync($"Clan with tag {player_tag} could not be found");

                return;
            }

            _playerInfo.Player = selectedPlayer;
            await ReplyAsync("", false, _playerInfo.BuildPlayerInfo());
        }