mirror of
https://github.com/pacnpal/Pac-cogs.git
synced 2025-12-20 10:51:05 -05:00
Proper use of hybrid_group for main command groups:
archiver: Main bot control commands settings: Configuration commands archivedb: Database management commands Consistent decorator order across all commands: @group.command() or @hybrid_group() @guild_only() @admin_or_permissions() (where needed) @app_commands.describe() (for parameters) Proper parameter descriptions using app_commands.describe for better slash command integration
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
"""Module for database-related commands"""
|
||||
|
||||
import discord
|
||||
from redbot.core.commands import Context, hybrid_group, hybrid_command, guild_only
|
||||
from redbot.core.utils.mod import admin_or_permissions
|
||||
from redbot.core.commands import Context, hybrid_group, guild_only, admin_or_permissions
|
||||
from discord import app_commands
|
||||
import logging
|
||||
from ..response_handler import handle_response
|
||||
@@ -101,7 +100,7 @@ def setup_database_commands(cog):
|
||||
ctx, "An error occurred while disabling the database."
|
||||
)
|
||||
|
||||
@cog.hybrid_command()
|
||||
@archivedb.command(name="check")
|
||||
@guild_only()
|
||||
@app_commands.describe(url="The URL of the video to check")
|
||||
async def checkarchived(ctx: Context, url: str):
|
||||
|
||||
Reference in New Issue
Block a user