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:
pacnpal
2024-11-15 00:50:55 +00:00
parent a760bef25d
commit 4e632276c2
2 changed files with 5 additions and 13 deletions

View File

@@ -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)