mirror of
https://github.com/pacnpal/Pac-cogs.git
synced 2025-12-20 02:41:06 -05:00
Commands will now work even during initialization
Only video processing features are blocked until initialization completes The on_message event handler now checks if a message is a command first and lets it process normally
This commit is contained in:
@@ -39,7 +39,17 @@ def setup_events(cog: "VideoArchiver") -> None:
|
||||
@cog.bot.event
|
||||
async def on_message(message: discord.Message) -> None:
|
||||
"""Handle new messages for video processing"""
|
||||
if not cog.ready.is_set() or message.guild is None or message.author.bot:
|
||||
# Only block video processing features, not command processing
|
||||
if message.guild is None or message.author.bot:
|
||||
return
|
||||
|
||||
# Check if this is a command - if so, let it process normally
|
||||
if message.content.startswith(await cog.bot.get_prefix(message)):
|
||||
return
|
||||
|
||||
# Only process videos if initialization is complete
|
||||
if not cog.ready.is_set():
|
||||
logger.debug("Skipping video processing - initialization not complete")
|
||||
return
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user