Refactor command definitions across various cogs to replace hybrid commands with regular commands for improved consistency and clarity. Update command structures in moderation, music, and other cogs to enhance user experience and streamline command handling.
Some checks failed
CI / Bot (Python) (push) Successful in 12s
CI / Dashboard (Next.js) (push) Failing after 9s

This commit is contained in:
TheOnlyMace
2026-07-21 22:59:25 +02:00
parent a52d84467d
commit d24b810164
25 changed files with 436 additions and 90 deletions

View File

@@ -159,7 +159,24 @@ class Giveaway(commands.Cog):
@commands.hybrid_command(description="Starts a new giveaway.")
@commands.hybrid_group(
name="giveaway",
aliases=["g"],
description="Manage server giveaways.",
fallback="help",
invoke_without_command=True,
)
@blacklist_check()
@ignore_check()
@commands.cooldown(1, 5, commands.BucketType.user)
@commands.has_guild_permissions(manage_guild=True)
async def giveaway(self, ctx):
"""Giveaway root — use `/giveaway <subcommand>` or `>giveaway <subcommand>`."""
if ctx.subcommand_passed is None:
await ctx.send_help(ctx.command)
ctx.command.reset_cooldown(ctx)
@giveaway.command(name="start", aliases=["gstart"], description="Starts a new giveaway.")
@blacklist_check()
@ignore_check()
@commands.cooldown(1, 5, commands.BucketType.user)
@@ -244,7 +261,7 @@ class Giveaway(commands.Cog):
print(f"Giveaway message deleted in {message.guild.name} - {message.guild.id}")
await self.connection.commit()
@commands.hybrid_command(name="gend", description="Ends a giveaway before its ending time.", help="Ends a giveaway before its ending time.")
@giveaway.command(name="end", aliases=["gend"], description="Ends a giveaway before its ending time.", help="Ends a giveaway before its ending time.")
@blacklist_check()
@ignore_check()
@commands.cooldown(1, 5, commands.BucketType.user)
@@ -329,7 +346,7 @@ class Giveaway(commands.Cog):
await ctx.send("Please reply to the giveaway message or provide the giveaway ID.")
await self.connection.commit()
@commands.hybrid_command(description="Rerolls a giveaway on replying the giveaway message.", help="Rerolls a giveaway on replying the giveaway message.")
@giveaway.command(name="reroll", aliases=["greroll"], description="Rerolls a giveaway on replying the giveaway message.", help="Rerolls a giveaway on replying the giveaway message.")
@blacklist_check()
@ignore_check()
@commands.cooldown(1, 5, commands.BucketType.user)
@@ -389,7 +406,7 @@ class Giveaway(commands.Cog):
return val * time_dict[unit]
@commands.hybrid_command(name="glist", description="Lists all ongoing giveaways.")
@giveaway.command(name="list", aliases=["glist"], description="Lists all ongoing giveaways.")
@blacklist_check()
@ignore_check()
@commands.cooldown(1, 5, commands.BucketType.user)