diff --git a/cogs/events.py b/cogs/events.py index 46312882..f5b3e31e 100644 --- a/cogs/events.py +++ b/cogs/events.py @@ -11,17 +11,6 @@ class Events(Cog): def __init__(self, bot): self.bot = bot - @Cog.listener() - async def on_message(self, message): - """Make sure bot messages are not tracked""" - - # Ignoring messages that start with 2 .. - if message.content.startswith("..") or message.author.bot: - return - - # Processing the message - await self.bot.process_commands(message) - @Cog.listener() async def on_ready(self): """Display startup message""" diff --git a/main.py b/main.py index cc540415..1909845b 100644 --- a/main.py +++ b/main.py @@ -20,5 +20,18 @@ from bot import Bot # Initiating Bot Object As Client client = Bot() + +@client.event +async def on_message(message): + """Make sure bot messages are not tracked""" + + # Ignoring messages that start with 2 .. + if message.content.startswith("..") or message.author.bot: + return + + # Processing the message + await client.process_commands(message) + + # Run the bot client.execute()