From 53117b5bcb38f3f2b40dfc0c5b5935daeb507cf0 Mon Sep 17 00:00:00 2001 From: Luke Robles <98352913+lrobles-iterable@users.noreply.github.com> Date: Thu, 2 Jun 2022 09:53:47 -0700 Subject: [PATCH] fixing the memegen function to return the help method if you just run !meme --- app/cogs/cheeky_functions.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/cogs/cheeky_functions.py b/app/cogs/cheeky_functions.py index 4a489805..e3d63fd3 100644 --- a/app/cogs/cheeky_functions.py +++ b/app/cogs/cheeky_functions.py @@ -128,11 +128,14 @@ class Cheeky(commands.Cog): import meme_gen await ctx.message.delete() - await ctx.send( - embed=core_utils.generate_embed( - embed_url=meme_gen.parse_message(ctx.message.content) + try: + await ctx.send( + embed=core_utils.generate_embed( + embed_url=meme_gen.parse_message(ctx.message.content) + ) ) - ) + except discord.errors.HTTPException: + await ctx.send(meme_gen.get_meme_help()) @commands.command(name="define", aliases=["ud"]) async def define(self, ctx: commands.Context):