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); }
public async Task UserAsync([Remainder] long id) { AnilistClient client = new AnilistClient(); var ch = await client.GetStaffAsync(id); await ReplyAsync(embed : AnilistHelper.BuildEmbed(ch)); }
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); }