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:
12
bot/Axiom.py
12
bot/Axiom.py
@@ -163,7 +163,7 @@ async def on_command_completion(context: commands.Context) -> None:
|
||||
|
||||
|
||||
# --- Utility Commands ---
|
||||
@client.hybrid_command(name='spotify')
|
||||
@client.command(name='spotify')
|
||||
async def spotify(ctx: Context, user: discord.Member = None):
|
||||
"""Shows what a user is listening to on Spotify."""
|
||||
user = user or ctx.author
|
||||
@@ -184,7 +184,7 @@ async def spotify(ctx: Context, user: discord.Member = None):
|
||||
await ctx.send(embed=embed)
|
||||
|
||||
|
||||
@client.hybrid_command(name='makeinvite', aliases=['createinvite', 'makeinv'])
|
||||
@client.command(name='makeinvite', aliases=['createinvite', 'makeinv'])
|
||||
@commands.is_owner()
|
||||
async def make_invite(ctx: Context, guild_id: int = None):
|
||||
"""Creates an invite for a specified server (owner only)."""
|
||||
@@ -214,7 +214,7 @@ async def make_invite(ctx: Context, guild_id: int = None):
|
||||
|
||||
|
||||
# --- Webhook Management Commands ---
|
||||
@client.hybrid_command(name='create_hook', aliases=['makehook'])
|
||||
@client.command(name='create_hook', aliases=['makehook'])
|
||||
@commands.has_permissions(administrator=True)
|
||||
async def create_hook(ctx: Context, *, name: str = None):
|
||||
"""Creates a webhook in the current channel."""
|
||||
@@ -236,7 +236,7 @@ async def create_hook(ctx: Context, *, name: str = None):
|
||||
await ctx.send(f"Webhook created: **{webhook.name}**\n||{webhook.url}||\n(I could not DM you the URL.)")
|
||||
|
||||
|
||||
@client.hybrid_command(name='delete_hook', aliases=['delhook'])
|
||||
@client.command(name='delete_hook', aliases=['delhook'])
|
||||
@commands.has_permissions(administrator=True)
|
||||
async def delete_hook(ctx: Context, webhook_url: str = None):
|
||||
"""Deletes a webhook using its URL."""
|
||||
@@ -252,7 +252,7 @@ async def delete_hook(ctx: Context, webhook_url: str = None):
|
||||
await ctx.send(f"{ERROR} Webhook not found or URL is invalid.")
|
||||
|
||||
|
||||
@client.hybrid_command(name='list_hooks', aliases=['hooks'])
|
||||
@client.command(name='list_hooks', aliases=['hooks'])
|
||||
@commands.has_permissions(administrator=True)
|
||||
async def list_hooks(ctx: Context):
|
||||
"""Lists all webhooks in the current channel."""
|
||||
@@ -270,7 +270,7 @@ async def list_hooks(ctx: Context):
|
||||
|
||||
|
||||
# --- Game Command ---
|
||||
@client.hybrid_command()
|
||||
@client.command()
|
||||
async def reaction(ctx: Context):
|
||||
"""See how fast you can react to the correct emoji."""
|
||||
emojis = ["🍪", "🎉", "🧋", "🍒", "🍑", "💸", "🌙", "💕"]
|
||||
|
||||
Reference in New Issue
Block a user