From 063a34f20983b6acfe92d9b1b20cd441e96540c4 Mon Sep 17 00:00:00 2001 From: SamlonDev Date: Mon, 26 May 2025 17:55:12 +0200 Subject: volume control and fixes to math --- cogs/math.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'cogs/math.py') diff --git a/cogs/math.py b/cogs/math.py index 80a6de9..df2be4a 100644 --- a/cogs/math.py +++ b/cogs/math.py @@ -1,6 +1,4 @@ -from base64 import decode -from codecs import utf_8_decode -import string +from discord.ext import commands import discord from discord import (ApplicationContext) import subprocess @@ -10,11 +8,10 @@ class Math(commands.Cog): self.bot = bot @commands.slash_command( - name="Math", - description="wrug szyskih matfisuf", - + name="math", + description="wrug szyskih matfisuf" ) - async def math(self, ctx:ApplicationContext, equation:string): + async def math(self, ctx:ApplicationContext, equation:str): try: math=subprocess.check_output(f"qalc -e {equation}", shell=True) await ctx.respond(f"{equation} = {math.decode('utf-8').strip()}") -- cgit v1.2.3