remove debug + comments + minor changes to error logging
@@ -37,7 +37,7 @@ class Events(commands.Cog):
bot.event(self.on_error) # discord.py's Cog.listener() doesn't work for on_error events
- async def on_error(self, event, *args, **kwargs):
+ async def on_error(self, event, *args, **kwargs): # logs errors in events, such as on_message
self.bot.error_count += 1
exception = sys.exc_info()[1]
@@ -66,9 +66,6 @@ class Events(commands.Cog):
async def on_message(self, message):
self.bot.message_count += 1
- if message.content == "raise":
- raise Exception("hehe")
-
if message.content.startswith(f"<@!{self.bot.user.id}>") or message.content.startswith(f"<@{self.bot.user.id}>"):
if message.guild is None:
prefix = self.d.default_prefix
