Ejemplo n.º 1
0
        public async Task LN(params string[] mangaNameArr)
        {
            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.LightNovel, mangaNameArr, Program.p.kitsuAuth);

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

                break;

            case Error.AnimeManga.NotFound:
                await ReplyAsync(Sentences.LNNotFound(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(false, result.answer));
                }
                break;

            default:
                throw new NotImplementedException();
            }
        }