diff options
Diffstat (limited to '')
| -rw-r--r-- | cogs/math.py | 7 |
1 files changed, 5 insertions, 2 deletions
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 @@ | |||
| 1 | import logging | ||
| 1 | import subprocess | 2 | import subprocess |
| 2 | 3 | ||
| 3 | from discord import (ApplicationContext) | 4 | from discord import ApplicationContext |
| 4 | from discord.ext import commands | 5 | from discord.ext import commands |
| 5 | 6 | ||
| 7 | logger = logging.getLogger(__name__) | ||
| 8 | |||
| 6 | 9 | ||
| 7 | class Math(commands.Cog): | 10 | class Math(commands.Cog): |
| 8 | def __init__(self, bot): | 11 | def __init__(self, bot): |
| @@ -18,7 +21,7 @@ class Math(commands.Cog): | |||
| 18 | await ctx.respond(f"{equation} = {math.decode('utf-8').strip()}") | 21 | await ctx.respond(f"{equation} = {math.decode('utf-8').strip()}") |
| 19 | except Exception as e: | 22 | except Exception as e: |
| 20 | await ctx.respond(e, ephemeral=True) | 23 | await ctx.respond(e, ephemeral=True) |
| 21 | print(e) | 24 | logger.error(f"Error in math command: {e}", exc_info=True) |
| 22 | 25 | ||
| 23 | 26 | ||
| 24 | def setup(bot): | 27 | def setup(bot): |
