public async Task Futurama(CommandContext ctx) { var results = await SimpsonsService.GetSimpsonsDataAsync(SimpsonsService.SiteRoot.Morbotron).ConfigureAwait(false); results.WithColor(new DiscordColor("#69E398")); await ctx.RespondAsync(embed : results.Build()).ConfigureAwait(false); }
public async Task RickMorty(CommandContext ctx) { var results = await SimpsonsService.GetSimpsonsDataAsync(SimpsonsService.SiteRoot.MasterOfAllScience).ConfigureAwait(false); results.WithColor(new DiscordColor("#ABD5EC")); await ctx.RespondAsync(embed : results.Build()).ConfigureAwait(false); }
public async Task SimpsonsGIF(CommandContext ctx, [RemainingText] string input) { await ctx.TriggerTypingAsync(); var gif = await SimpsonsService.GetSimpsonsGifAsync(); if (string.IsNullOrWhiteSpace(input)) { await ctx.RespondAsync(gif); } else // Include episode information if any kind of parameter is inputted { var data = await SimpsonsService.GetSimpsonsDataAsync(); var output = new DiscordEmbedBuilder() .WithTitle(data.Episode.Title) .AddField("Season/Episode", data.Episode.Key, true) .AddField("Air Date", data.Episode.OriginalAirDate, true) .AddField("Writer", data.Episode.Writer, true) .AddField("Director", data.Episode.Director, true) .WithFooter("Note: First time gifs take a few minutes to properly generate") .WithUrl(data.Episode.WikiLink) .WithColor(DiscordColor.Yellow); await ctx.RespondAsync(gif, embed : output.Build()); } }
public async Task Simpsons(CommandContext ctx) { var results = await SimpsonsService.GetSimpsonsDataAsync(SimpsonsService.SiteRoot.Frinkiac) .ConfigureAwait(false); await ctx.RespondAsync(results.Build()).ConfigureAwait(false); }
public async Task SimpsonsGIF(CommandContext ctx, [Description("Inputting anything will add episode information")][RemainingText] string input) { var output = await SimpsonsService.GetSimpsonsGifAsync(SimpsonsService.SiteRoot.Frinkiac).ConfigureAwait(false); if (string.IsNullOrWhiteSpace(input)) { await ctx.RespondAsync(output).ConfigureAwait(false); } else // Include episode information if any kind of parameter is inputted { var results = await SimpsonsService.GetSimpsonsDataAsync(SimpsonsService.SiteRoot.Frinkiac).ConfigureAwait(false); results.WithFooter(Resources.SIMPSONS_GIF_WARNING); await ctx.RespondAsync(output, embed : results.Build()).ConfigureAwait(false); } }
public async Task Simpsons(CommandContext ctx) { await ctx.TriggerTypingAsync(); var data = await SimpsonsService.GetSimpsonsDataAsync(); var output = new DiscordEmbedBuilder() .WithTitle(data.Episode.Title) .AddField("Season/Episode", data.Episode.Key, true) .AddField("Air Date", data.Episode.OriginalAirDate, true) .AddField("Writer", data.Episode.Writer, true) .AddField("Director", data.Episode.Director, true) .WithImageUrl($"https://frinkiac.com/img/{data.Frame.Episode}/{data.Frame.Timestamp}.jpg") .WithUrl(data.Episode.WikiLink) .WithColor(DiscordColor.Yellow); await ctx.RespondAsync(embed : output.Build()); }
public async Task FuturamaGif(CommandContext ctx, [Description("Inputting anything will add episode information.")][RemainingText] string input) { var output = await SimpsonsService.GetSimpsonsGifAsync(SimpsonsService.SiteRoot.Morbotron) .ConfigureAwait(false); if (string.IsNullOrWhiteSpace(input)) { await ctx.RespondAsync(output).ConfigureAwait(false); return; } // Include episode information if any kind of parameter is inputted var results = await SimpsonsService.GetSimpsonsDataAsync(SimpsonsService.SiteRoot.Morbotron) .ConfigureAwait(false); results.WithFooter(Resources.INFO_GIF_LOADING); results.WithColor(new DiscordColor("#69E398")); await ctx.RespondAsync(output, results.Build()).ConfigureAwait(false); }
public void GetFuturamaEpisode() { Assert.NotNull(SimpsonsService.GetSimpsonsDataAsync(SimpsonsService.SiteRoot.Morbotron).Result.Title); }
public void GetSimpsonsEpisode() { Assert.NotNull(SimpsonsService.GetSimpsonsDataAsync(SimpsonsService.SiteRoot.Frinkiac).Result.Title); }
public void GetRickMortyEpisode() { Assert.NotNull(SimpsonsService.GetSimpsonsDataAsync(SimpsonsService.SiteRoot.MasterOfAllScience).Result .Title); }