diff --git a/cogs/Embeds.py b/cogs/Embeds.py index 0e974cb5..5b41ca78 100644 --- a/cogs/Embeds.py +++ b/cogs/Embeds.py @@ -1,4 +1,3 @@ -import asyncio import datetime import random @@ -42,7 +41,7 @@ class Embeds(commands.Cog): else: - await errorFunction(ctx) + await errorFunction() # except FileNotFoundError as e: print(e) @@ -72,7 +71,7 @@ class Embeds(commands.Cog): else: - await errorFunction(ctx) + await errorFunction() except FileNotFoundError as e: print(e) @@ -102,7 +101,7 @@ class Embeds(commands.Cog): else: - await errorFunction(ctx) + await errorFunction() except FileNotFoundError as e: print(e) @@ -131,19 +130,14 @@ class Embeds(commands.Cog): await ctx.send(embed=embed) else: - await errorFunction(ctx) + await errorFunction() except FileNotFoundError as e: print(e) -async def errorFunction(ctx): - message = await ctx.send(error_function()) - - # Let the user read the message for 2.5 seconds - await asyncio.sleep(2.5) - # Delete the message - await message.delete() +def errorFunction(): + return error_function() def setup(bot): diff --git a/cogs/FunCommands.py b/cogs/FunCommands.py index 7d876360..f29b4de0 100644 --- a/cogs/FunCommands.py +++ b/cogs/FunCommands.py @@ -117,7 +117,7 @@ class Fun(commands.Cog): else: - await errorFunction(ctx) + await errorFunction() except FileNotFoundError as e: print(e)