示例#1
0
 public static Page ToDiscordPage(this MovieInfo info, DiscordColor?color = null)
 {
     return(new Page()
     {
         Embed = info.ToDiscordEmbed(color)
     });
 }
示例#2
0
        private async Task SearchAndSendResultAsync(CommandContext ctx, OMDbQueryType type, string query)
        {
            if (this.Service.IsDisabled())
            {
                throw new ServiceDisabledException();
            }

            MovieInfo info = await this.Service.GetSingleResultAsync(type, query);

            if (info == null)
            {
                await this.InformFailureAsync(ctx, "No results found!");

                return;
            }

            await ctx.RespondAsync(embed : info.ToDiscordEmbed(this.ModuleColor));
        }
示例#3
0
 public static Page ToDiscordPage(this MovieInfo info, DiscordColor?color = null)
 => new Page(embed: info.ToDiscordEmbed(color));