Ejemplo n.º 1
0
        private async Task SendUserInventoryList(List <List <PokemonForReturnDto> > listOfCollections, UserForReturnDto userData, string username)
        {
            var uniqueCount = userData.PokeCollection.Select(x => x.Name).Distinct().Count();
            var message     = $":globe_with_meridians:` HELLO, {username.ToUpper()}. WELCOME TO YOUR POKEMON STORAGE UNIT. \nBELOW YOU CAN FIND A LIST OF ALL THE POKEMON YOU'VE CAUGHT...`\n\n";

            message += $":ballot_box:`POKE STORAGE | Unique Pokemon Found: {uniqueCount} / 151`\n";
            foreach (var collection in listOfCollections)
            {
                message += PokeCollectionUtil.ChunkToString(collection);
                await _discord.GetUser(userData.DiscordId).SendMessageAsync(message);

                message = "";
            }
        }
Ejemplo n.º 2
0
        public async Task SendPokemonListToPlayer(ulong discordId)
        {
            var userForReturn = await _userController.GetUserByDiscordId(discordId);

            var    listOfCollections = PokeCollectionUtil.SlicePokeCollection((List <PokemonForReturnDto>)userForReturn.PokeCollection, 20);
            string message           = "```🍚 Type `!choose #` where '#' is the pokemon's corresponding Id number.```";

            foreach (var collection in listOfCollections)
            {
                message += PokeCollectionUtil.ChunkToString(collection);
                await SendPlayerMessage(message, discordId);

                message = "";
            }
        }