public async Task Tronald() { var random = await TronaldService.GetRandom(); var embed = new EmbedBuilder(); embed.WithAuthor("Donald Dumb", "https://i.pinimg.com/originals/e9/dd/4c/e9dd4c4e1c4eb9ef2d2a29b04fcb382f.jpg"); embed.WithTitle($"Contains the following tag : {random.Tags[0]}"); embed.WithColor(Color.Teal); embed.WithDescription(random.Value); embed.WithFooter(random.Embed.Source[0].Url); await SendEmbedAsync(embed.Build()); }
public async Task Tronald(string tag) { if (tag == "tags") { var tags = await TronaldService.GetTags(); var embed = new EmbedBuilder(); embed.WithAuthor("Donald Dumb", "https://i.pinimg.com/originals/e9/dd/4c/e9dd4c4e1c4eb9ef2d2a29b04fcb382f.jpg"); embed.WithColor(Color.Teal); embed.WithTitle("Available search tags"); var str = new StringBuilder(); foreach (var t in tags.Embed.Tags) { str.AppendLine(t.Value); } embed.WithDescription(str.ToString()); await SendEmbedAsync(embed.Build()); } }