diff --git a/EnsoBot.py b/EnsoBot.py index ce57a5e7..a718322d 100644 --- a/EnsoBot.py +++ b/EnsoBot.py @@ -198,11 +198,6 @@ async def on_raw_reaction_remove(payload): print(e) -# Error handling function to make sure that the commands only work in enso-chan-commands -def error_function(): - return "Sorry! I only work in #enso-chan-commands!" - - # Run the bot, allowing to come online try: client.run(API_TOKEN) diff --git a/cogs/Embeds.py b/cogs/Embeds.py index d5633a3a..a8412e4c 100644 --- a/cogs/Embeds.py +++ b/cogs/Embeds.py @@ -7,7 +7,6 @@ from discord.ext import commands from discord.ext.commands import BucketType, cooldown import config -from EnsoBot import error_function colour_list = [c for c in config.colors.values()] channels = ["enso-chan-commands", 'general'] @@ -154,5 +153,10 @@ class Embeds(commands.Cog): print(e) +# Error handling function to make sure that the commands only work in enso-chan-commands +def error_function(): + return "Sorry! I only work in #enso-chan-commands!" + + def setup(bot): bot.add_cog(Embeds(bot)) diff --git a/cogs/FunCommands.py b/cogs/FunCommands.py index b3e2a664..725d62a5 100644 --- a/cogs/FunCommands.py +++ b/cogs/FunCommands.py @@ -6,7 +6,7 @@ from discord.ext import commands from discord.ext.commands import BucketType, cooldown import config -from EnsoBot import error_function +from cogs.Embeds import error_function colour_list = [c for c in config.colors.values()] diff --git a/cogs/WaifuImages.py b/cogs/WaifuImages.py index e7d5071c..83b0adfe 100644 --- a/cogs/WaifuImages.py +++ b/cogs/WaifuImages.py @@ -8,7 +8,7 @@ from discord.ext import commands from discord.ext.commands import cooldown, BucketType import config -from EnsoBot import error_function +from cogs.Embeds import error_function channels = ["enso-chan-commands"]