Implement slash command synchronization features in environment files and update command definitions to hybrid commands across various cogs. Enhance command registration for improved user experience and streamline command handling in the bot.

This commit is contained in:
TheOnlyMace
2026-07-21 22:41:41 +02:00
parent f15c869993
commit fc77f0a3c2
51 changed files with 382 additions and 153 deletions

View File

@@ -21,7 +21,7 @@ class Messagespack(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command(name="addmessages", aliases=["addmsg"])
@commands.hybrid_command(name="addmessages", aliases=["addmsg"])
@commands.has_permissions(manage_messages=True)
async def addmessages(self, ctx, member: discord.Member, amount: int):
if amount <= 0:
@@ -46,7 +46,7 @@ class Messagespack(commands.Cog):
conn.close()
await ctx.send(f"Added {amount} messages to {member.mention} for today.")
@commands.command(name="removemessages", aliases=["removemsg"])
@commands.hybrid_command(name="removemessages", aliases=["removemsg"])
@commands.has_permissions(manage_messages=True)
async def removemessages(self, ctx, member: discord.Member, amount: int):
if amount <= 0:
@@ -70,7 +70,7 @@ class Messagespack(commands.Cog):
await ctx.send(f"{member.mention} has no messages recorded for today.")
conn.close()
@commands.command(name="clearmessage", aliases=["clearmsg"])
@commands.hybrid_command(name="clearmessage", aliases=["clearmsg"])
@commands.has_permissions(manage_messages=True)
async def clearmessage(self, ctx, member: discord.Member):
conn = sqlite3.connect(db_path("messages.db"))