public static Page ToDiscordPage(this MovieInfo info, DiscordColor?color = null) { return(new Page() { Embed = info.ToDiscordEmbed(color) }); }
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)); }
public static Page ToDiscordPage(this MovieInfo info, DiscordColor?color = null) => new Page(embed: info.ToDiscordEmbed(color));