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:
@@ -89,7 +89,7 @@ class Message(commands.Cog):
|
||||
self.color = 0xFF0000
|
||||
|
||||
|
||||
@commands.group(invoke_without_command=True, aliases=["purge"], help="Clears the messages")
|
||||
@commands.hybrid_group(invoke_without_command=True, aliases=["purge"], help="Clears the messages")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -232,7 +232,7 @@ class Message(commands.Cog):
|
||||
|
||||
|
||||
|
||||
@commands.command(name="purgebots",
|
||||
@commands.hybrid_command(name="purgebots",
|
||||
aliases=["cleanup", "pb", "clearbot", "clearbots"],
|
||||
help="Clear recently bot messages in channel")
|
||||
@blacklist_check()
|
||||
@@ -250,7 +250,7 @@ class Message(commands.Cog):
|
||||
await do_removal(ctx, search, predicate)
|
||||
|
||||
|
||||
@commands.command(name="purgeuser",
|
||||
@commands.hybrid_command(name="purgeuser",
|
||||
aliases=["pu", "cu", "clearuser"],
|
||||
help="Clear recent messages of a user in channel")
|
||||
@blacklist_check()
|
||||
|
||||
@@ -115,7 +115,7 @@ class Moderation(commands.Cog):
|
||||
|
||||
|
||||
|
||||
@commands.command()
|
||||
@commands.hybrid_command()
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -793,7 +793,7 @@ class Moderation(commands.Cog):
|
||||
|
||||
|
||||
|
||||
@commands.command(aliases=["deletesticker", "removesticker"], description="Delete the sticker from the server")
|
||||
@commands.hybrid_command(aliases=["deletesticker", "removesticker"], description="Delete the sticker from the server")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -815,7 +815,7 @@ class Moderation(commands.Cog):
|
||||
await ctx.reply("Failed to delete the sticker")
|
||||
|
||||
|
||||
@commands.command(aliases=["deleteemoji", "removeemoji"], description="Deletes the emoji from the server")
|
||||
@commands.hybrid_command(aliases=["deleteemoji", "removeemoji"], description="Deletes the emoji from the server")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
@@ -864,7 +864,7 @@ class Moderation(commands.Cog):
|
||||
|
||||
|
||||
|
||||
@commands.command(description="Changes the icon for the role.")
|
||||
@commands.hybrid_command(description="Changes the icon for the role.")
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 3, commands.BucketType.user)
|
||||
|
||||
@@ -56,7 +56,7 @@ class Role(commands.Cog):
|
||||
self.color = 0xFF0000
|
||||
|
||||
|
||||
@commands.group(name="role",invoke_without_command=True)
|
||||
@commands.hybrid_group(name="role",invoke_without_command=True)
|
||||
@blacklist_check()
|
||||
@ignore_check()
|
||||
@commands.cooldown(1, 5, commands.BucketType.user)
|
||||
@@ -598,7 +598,7 @@ class Role(commands.Cog):
|
||||
|
||||
|
||||
|
||||
@commands.group(name="removerole",invoke_without_command=True,
|
||||
@commands.hybrid_group(name="removerole",invoke_without_command=True,
|
||||
aliases=['rrole'],
|
||||
help="remove a role from all members .")
|
||||
@blacklist_check()
|
||||
|
||||
@@ -36,7 +36,7 @@ class Snipe(commands.Cog):
|
||||
'deleted_at': datetime.utcnow()
|
||||
}
|
||||
|
||||
@commands.command(name='snipe', help="Shows the most recently deleted message in the channel.")
|
||||
@commands.hybrid_command(name='snipe', help="Shows the most recently deleted message in the channel.")
|
||||
@commands.has_permissions(manage_messages=True)
|
||||
async def snipe(self, ctx):
|
||||
# Check if there is a sniped message for the current channel
|
||||
|
||||
@@ -53,7 +53,7 @@ class TopCheck(commands.Cog):
|
||||
await db.execute("UPDATE topcheck SET enabled = 0 WHERE guild_id = ?", (guild_id,))
|
||||
await db.commit()
|
||||
|
||||
@commands.group(
|
||||
@commands.hybrid_group(
|
||||
name="topcheck",
|
||||
help="Manage topcheck settings for the server.",
|
||||
invoke_without_command=True)
|
||||
|
||||
Reference in New Issue
Block a user