From a17a56ea2d60888dcffceea839eb839210b71b9a Mon Sep 17 00:00:00 2001 From: sgoudham Date: Thu, 18 Jun 2020 04:44:52 +0100 Subject: [PATCH] Trying to get errorFunction to work --- cogs/Embeds.py | 9 +++++---- cogs/FunCommands.py | 2 +- cogs/WaifuImages.py | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/cogs/Embeds.py b/cogs/Embeds.py index 51c8ea55..d5633a3a 100644 --- a/cogs/Embeds.py +++ b/cogs/Embeds.py @@ -41,7 +41,7 @@ class Embeds(commands.Cog): await ctx.send(embed=embed) else: - message = error_function() + message = await ctx.send(error_function()) # Let the user read the message for 2.5 seconds await asyncio.sleep(2.5) @@ -75,7 +75,7 @@ class Embeds(commands.Cog): await ctx.send(embed=embed) else: - message = error_function() + message = await ctx.send(error_function()) # Let the user read the message for 2.5 seconds await asyncio.sleep(2.5) @@ -109,7 +109,7 @@ class Embeds(commands.Cog): await ctx.send(embed=embed) else: - message = error_function() + message = await ctx.send(error_function()) # Let the user read the message for 2.5 seconds await asyncio.sleep(2.5) @@ -143,7 +143,7 @@ class Embeds(commands.Cog): await ctx.send(embed=embed) else: - message = error_function() + message = await ctx.send(error_function()) # Let the user read the message for 2.5 seconds await asyncio.sleep(2.5) @@ -153,5 +153,6 @@ class Embeds(commands.Cog): except FileNotFoundError as e: print(e) + def setup(bot): bot.add_cog(Embeds(bot)) diff --git a/cogs/FunCommands.py b/cogs/FunCommands.py index e791bfb8..b3e2a664 100644 --- a/cogs/FunCommands.py +++ b/cogs/FunCommands.py @@ -118,7 +118,7 @@ class Fun(commands.Cog): else: - message = error_function() + message = await ctx.send(error_function()) # Let the user read the message for 2.5 seconds await asyncio.sleep(2.5) diff --git a/cogs/WaifuImages.py b/cogs/WaifuImages.py index 9a68c9b0..e7d5071c 100644 --- a/cogs/WaifuImages.py +++ b/cogs/WaifuImages.py @@ -42,7 +42,7 @@ class Waifus(commands.Cog): else: - message = error_function() + message = await ctx.send(error_function()) # Let the user read the message for 2.5 seconds await asyncio.sleep(2.5) @@ -75,7 +75,7 @@ class Waifus(commands.Cog): else: - message = error_function() + message = await ctx.send(error_function()) # Let the user read the message for 2.5 seconds await asyncio.sleep(2.5) @@ -107,7 +107,7 @@ class Waifus(commands.Cog): else: - message = error_function() + message = await ctx.send(error_function()) # Let the user read the message for 2.5 seconds await asyncio.sleep(2.5)