From 0eb1a48fca5668c7c5c35ef81d247b4511d8e78a Mon Sep 17 00:00:00 2001 From: Samlon Date: Mon, 11 Aug 2025 17:16:33 +0200 Subject: changed printing to proper logging --- cogs/math.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'cogs/math.py') diff --git a/cogs/math.py b/cogs/math.py index 53340f2..a837ed9 100644 --- a/cogs/math.py +++ b/cogs/math.py @@ -1,8 +1,11 @@ +import logging import subprocess -from discord import (ApplicationContext) +from discord import ApplicationContext from discord.ext import commands +logger = logging.getLogger(__name__) + class Math(commands.Cog): def __init__(self, bot): @@ -18,7 +21,7 @@ class Math(commands.Cog): await ctx.respond(f"{equation} = {math.decode('utf-8').strip()}") except Exception as e: await ctx.respond(e, ephemeral=True) - print(e) + logger.error(f"Error in math command: {e}", exc_info=True) def setup(bot): -- cgit v1.2.3