Esempio n. 1
0
File: Web.cs Progetto: ta1H3n/Namiko
        public async Task AutocompleteWaifu([Remainder] string name)
        {
            await Context.Channel.TriggerTypingAsync();

            var eb = new EmbedBuilderPrepared(Context.User);

            var waifus = await WebUtil.GetWaifus(name);

            string list = "";

            foreach (var w in waifus.Results.Take(10))
            {
                list += $"`{w.MalId}` [{w.Name}]({w.URL}) - *{(w.Animeography.FirstOrDefault() == null ? w.Mangaography.FirstOrDefault().Name : w.Animeography.FirstOrDefault().Name)}*\n";
            }
            eb.WithDescription(list);

            await Context.Channel.SendMessageAsync(embed : eb.Build());
        }