예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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());
            }
        }
예제 #4
0
        public async Task Simpsons(CommandContext ctx)
        {
            var results = await SimpsonsService.GetSimpsonsDataAsync(SimpsonsService.SiteRoot.Frinkiac)
                          .ConfigureAwait(false);

            await ctx.RespondAsync(results.Build()).ConfigureAwait(false);
        }
예제 #5
0
        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);
            }
        }
예제 #6
0
        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());
        }
예제 #7
0
        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);
        }
예제 #8
0
 public void GetFuturamaEpisode()
 {
     Assert.NotNull(SimpsonsService.GetSimpsonsDataAsync(SimpsonsService.SiteRoot.Morbotron).Result.Title);
 }
예제 #9
0
 public void GetSimpsonsEpisode()
 {
     Assert.NotNull(SimpsonsService.GetSimpsonsDataAsync(SimpsonsService.SiteRoot.Frinkiac).Result.Title);
 }
예제 #10
0
 public void GetRickMortyEpisode()
 {
     Assert.NotNull(SimpsonsService.GetSimpsonsDataAsync(SimpsonsService.SiteRoot.MasterOfAllScience).Result
                    .Title);
 }