mirror of
https://github.com/pacnpal/Pac-cogs.git
synced 2025-12-20 02:41:06 -05:00
fix: Resolve command registration issues - Separate command handling into VideoArchiverCommands - Update command registration in __init__.py - Remove duplicate command registration
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
"""VideoArchiver cog for Red-DiscordBot"""
|
||||
from redbot.core.bot import Red
|
||||
from .video_archiver import VideoArchiver
|
||||
from .commands import VideoArchiverCommands
|
||||
|
||||
async def setup(bot: Red) -> None:
|
||||
"""Load VideoArchiver."""
|
||||
cog = VideoArchiver(bot)
|
||||
await bot.add_cog(cog)
|
||||
# Sync commands with Discord
|
||||
if not hasattr(bot, "tree"):
|
||||
return
|
||||
await bot.tree.sync()
|
||||
# Add commands from VideoArchiverCommands
|
||||
commands_cog = VideoArchiverCommands(bot, cog.config_manager, cog.update_checker, cog.processor)
|
||||
await bot.add_cog(commands_cog)
|
||||
|
||||
Reference in New Issue
Block a user