Beispiel #1
0
        public async Task GetStaff()
        {
            AnilistClient client = new AnilistClient();
            var           ch     = await client.GetStaffAsync("Shinichi Fukuda");

            Assert.NotNull(ch);

            ch = await client.GetStaffAsync(105350);

            Assert.NotNull(ch);
        }
Beispiel #2
0
        public async Task UserAsync([Remainder] long id)
        {
            AnilistClient client = new AnilistClient();
            var           ch     = await client.GetStaffAsync(id);

            await ReplyAsync(embed : AnilistHelper.BuildEmbed(ch));
        }
Beispiel #3
0
        public async Task UserAsyncid([Remainder] long Id)
        {
            AnilistClient client = new AnilistClient();
            var           test   = await client.GetStaffAsync(Id);

            string nom         = test.FirstName + " " + test.LastName;
            string Description = string.Empty;

            if (test.Description.Length > 2048)
            {
                Description = test.Description.Replace("~!", "||").Replace("!~", "||").Remove(2048);
            }
            else
            {
                Description = test.Description.Replace("~!", "||").Replace("!~", "||");
            }
            var embed = new EmbedBuilder()
            {
                Title        = nom.PadLeft(4, ','),
                Url          = test.SiteUrl,
                Description  = Description,
                ThumbnailUrl = test.LargeImageUrl,
                Color        = Discord.Color.Red,
                Footer       = new EmbedFooterBuilder()
                {
                    IconUrl = test.LargeImageUrl,
                    Text    = nom,
                }
            }.Build();

            await ReplyAsync(Context.User.Mention, embed : embed);
        }