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:
@@ -129,7 +129,7 @@ class Jail(commands.Cog):
|
||||
)
|
||||
await log_channel.send(view=CV2("🔓 Member Unjailed", desc))
|
||||
|
||||
@commands.hybrid_command(name="jail")
|
||||
@commands.command(name="jail")
|
||||
@commands.has_permissions(manage_roles=True)
|
||||
async def jail(self, ctx, member: discord.Member, duration: str = None, *, reason="No reason provided"):
|
||||
jail_role_id = self.get_setting(ctx.guild.id, "jail_role")
|
||||
@@ -182,13 +182,13 @@ class Jail(commands.Cog):
|
||||
)
|
||||
await log_channel.send(view=CV2("🔒 Member Jailed", desc))
|
||||
|
||||
@commands.hybrid_command(name="unjail")
|
||||
@commands.command(name="unjail")
|
||||
@commands.has_permissions(manage_roles=True)
|
||||
async def unjail(self, ctx, member: discord.Member):
|
||||
await self.unjail_member(ctx.guild, member)
|
||||
await ctx.send(view=CV2("✅ Success", f"{member.mention} has been unjailed."))
|
||||
|
||||
@commands.hybrid_command(name="jailhistory")
|
||||
@commands.command(name="jailhistory")
|
||||
async def jailhistory(self, ctx, member: discord.Member):
|
||||
cursor = self.conn.execute("""
|
||||
SELECT reason, jailed_at, duration, mod_id FROM jailed
|
||||
|
||||
Reference in New Issue
Block a user