Trying to get errorFunction to work

pull/2/head
sgoudham 4 years ago
parent a17a56ea2d
commit 7a51607ff8

@ -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)

@ -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))

@ -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()]

@ -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"]

Loading…
Cancel
Save