Refactor command definitions across multiple cogs to replace hybrid commands with regular commands for consistency. This change enhances clarity and standardizes command handling throughout the bot.
This commit is contained in:
@@ -25,14 +25,14 @@ class Global(commands.Cog):
|
||||
self.local_frozen_nicks = {}
|
||||
self.client.frozen_nicknames = {}
|
||||
|
||||
@commands.hybrid_group(name="global", invoke_without_command=True)
|
||||
@commands.group(name="global", invoke_without_command=True)
|
||||
@commands.is_owner()
|
||||
async def global_command(self, ctx: commands.Context):
|
||||
if ctx.subcommand_passed is None:
|
||||
await ctx.send_help(ctx.command)
|
||||
ctx.command.reset_cooldown(ctx)
|
||||
|
||||
@commands.hybrid_command(name="gb", aliases=["GB"], help="Bans the user from all mutual guilds.")
|
||||
@commands.command(name="gb", help="Bans the user from all mutual guilds.")
|
||||
@commands.is_owner()
|
||||
async def global_ban(self, ctx: commands.Context, user: discord.User, reason: str = "Severe violations of Discord's terms of service."):
|
||||
mutual_guilds = [guild for guild in self.client.guilds if guild.get_member(user.id)]
|
||||
@@ -563,7 +563,7 @@ class Global(commands.Cog):
|
||||
await ctx.send(f"✅ | Nickname freezing stopped for {user.name}.")
|
||||
|
||||
|
||||
@commands.hybrid_command(name="freezenick", help="Freezes a member's nickname in the current server.")
|
||||
@commands.command(name="freezenick", help="Freezes a member's nickname in the current server.")
|
||||
@commands.has_permissions(manage_nicknames=True)
|
||||
async def freeze_nickname(self, ctx: commands.Context, member: Member, *, nickname: str):
|
||||
guild_id = ctx.guild.id
|
||||
@@ -597,7 +597,7 @@ class Global(commands.Cog):
|
||||
|
||||
self.client.loop.create_task(monitor_nickname())
|
||||
|
||||
@commands.hybrid_command(name="unfreezenick", help="Unfreezes a member's nickname in the current server.")
|
||||
@commands.command(name="unfreezenick", help="Unfreezes a member's nickname in the current server.")
|
||||
@commands.has_permissions(manage_nicknames=True)
|
||||
async def unfreeze_nickname(self, ctx: commands.Context, member: Member):
|
||||
guild_id = ctx.guild.id
|
||||
|
||||
Reference in New Issue
Block a user