Exemplo n.º 1
0
        public async Task Anime(params string[] animeNameArr)
        {
            Base.Utilities.CheckAvailability(Context.Guild, Program.Module.AnimeManga);
            await p.DoAction(Context.User, Program.Module.AnimeManga);

            var result = await Features.Entertainment.AnimeManga.SearchAnime(Features.Entertainment.AnimeManga.SearchType.Anime, animeNameArr, Program.p.kitsuAuth);

            switch (result.error)
            {
            case Error.AnimeManga.Help:
                await ReplyAsync(Sentences.AnimeHelp(Context.Guild));

                break;

            case Error.AnimeManga.NotFound:
                await ReplyAsync(Sentences.AnimeNotFound(Context.Guild));

                break;

            case Error.AnimeManga.None:
                if (Context.Guild != null && result.answer.nsfw && !((ITextChannel)Context.Channel).IsNsfw)
                {
                    await ReplyAsync(Base.Sentences.AnswerNsfw(Context.Guild));
                }
                else
                {
                    await ReplyAsync("", false, CreateEmbed(true, result.answer));
                }
                break;

            default:
                throw new NotImplementedException();
            }
        }