refactor: minor fixes everywhere

This commit is contained in:
2025-01-05 23:43:08 -05:00
parent ebde4f1310
commit 565dbb6f47
11 changed files with 44 additions and 47 deletions

View File

@@ -1,5 +1,16 @@
from . import bot, tools, utils, voice
from .utils import *
from .utils import Command, match, match_token, tokenize
__all__ = [
"bot",
"tools",
"utils",
"voice",
"Command",
"match",
"match_token",
"tokenize",
]
def __reload_module__():

View File

@@ -1,7 +1,6 @@
import re
import arguments
import commands
import utils
@@ -67,7 +66,7 @@ async def clear(message):
if args.delete_command:
try:
await message.delete()
except:
except Exception:
pass
regex = None
@@ -101,5 +100,5 @@ async def clear(message):
message,
f"purged **{messages}/{args.count} {'message' if args.count == 1 else 'messages'}**",
)
except:
except Exception:
pass

View File

@@ -299,9 +299,6 @@ async def volume(message):
if not command_allowed(message):
return
if not message.guild.voice_client:
return
tokens = commands.tokenize(message.content)
parser = arguments.ArgumentParser(tokens[0], "set the current volume level")
parser.add_argument(
@@ -314,10 +311,7 @@ async def volume(message):
return
if not message.guild.voice_client.source:
await utils.reply(
message,
f"nothing is playing!",
)
await utils.reply(message, "nothing is playing!")
return
if args.volume is None: