mirror of
https://github.com/pacnpal/Pac-cogs.git
synced 2025-12-20 02:41:06 -05:00
fix: Properly implement slash commands - Use app_commands for slash command support - Add proper command group structure - Handle command registration and syncing
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
"""VideoArchiver cog for Red-DiscordBot"""
|
||||
|
||||
from redbot.core.bot import Red
|
||||
from redbot.core.utils import get_end_user_data_statement
|
||||
from .video_archiver import VideoArchiver
|
||||
|
||||
from videoarchiver.video_archiver import VideoArchiver
|
||||
from videoarchiver.ffmpeg.ffmpeg_manager import FFmpegManager
|
||||
from videoarchiver.ffmpeg.exceptions import FFmpegError, GPUError, DownloadError
|
||||
|
||||
__red_end_user_data_statement__ = get_end_user_data_statement(__file__)
|
||||
|
||||
async def setup(bot: Red):
|
||||
await bot.add_cog(VideoArchiver(bot))
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user