gfer
This commit is contained in:
parent
a7400a79d3
commit
a47cf764e6
@ -4133,9 +4133,7 @@ Otherwise, STAY SILENT. Do not respond just to be present or because you *can*.
|
|||||||
# --- Decide if we should even CONSIDER responding (call the AI) ---
|
# --- Decide if we should even CONSIDER responding (call the AI) ---
|
||||||
should_consider_responding = False
|
should_consider_responding = False
|
||||||
consideration_reason = "Default"
|
consideration_reason = "Default"
|
||||||
|
proactive_trigger_met = False # Initialize proactive_trigger_met variable before it's used
|
||||||
# Initialize proactive_trigger_met variable
|
|
||||||
proactive_trigger_met = False
|
|
||||||
|
|
||||||
# Always consider if mentioned, replied to, or name used directly
|
# Always consider if mentioned, replied to, or name used directly
|
||||||
if bot_mentioned or replied_to_bot or gurt_in_message:
|
if bot_mentioned or replied_to_bot or gurt_in_message:
|
||||||
|
@ -29,11 +29,7 @@ class ProfileUpdaterCog(commands.Cog):
|
|||||||
async def cog_load(self):
|
async def cog_load(self):
|
||||||
"""Initialize resources when the cog is loaded."""
|
"""Initialize resources when the cog is loaded."""
|
||||||
self.session = aiohttp.ClientSession()
|
self.session = aiohttp.ClientSession()
|
||||||
# Wait until the bot is ready to get other cogs
|
# Removed wait_until_ready and gurt_cog retrieval from here
|
||||||
await self.bot.wait_until_ready()
|
|
||||||
self.gurt_cog = self.bot.get_cog('GurtCog')
|
|
||||||
if not self.gurt_cog:
|
|
||||||
print("ERROR: ProfileUpdaterCog could not find GurtCog. AI features will not work.")
|
|
||||||
if not self.bot_token:
|
if not self.bot_token:
|
||||||
print("WARNING: BOT_TOKEN environment variable not set. Bio updates will fail.")
|
print("WARNING: BOT_TOKEN environment variable not set. Bio updates will fail.")
|
||||||
print(f"ProfileUpdaterCog loaded. Update interval: {self.update_interval_hours} hours.")
|
print(f"ProfileUpdaterCog loaded. Update interval: {self.update_interval_hours} hours.")
|
||||||
@ -58,9 +54,14 @@ class ProfileUpdaterCog(commands.Cog):
|
|||||||
|
|
||||||
@profile_update_task.before_loop
|
@profile_update_task.before_loop
|
||||||
async def before_profile_update_task(self):
|
async def before_profile_update_task(self):
|
||||||
"""Wait until the bot is ready before starting the loop."""
|
"""Wait until the bot is ready and get GurtCog before starting the loop."""
|
||||||
await self.bot.wait_until_ready()
|
await self.bot.wait_until_ready()
|
||||||
print("ProfileUpdaterTask: Bot ready, starting loop.")
|
print("ProfileUpdaterTask: Bot ready, attempting to get GurtCog...")
|
||||||
|
self.gurt_cog = self.bot.get_cog('GurtCog')
|
||||||
|
if not self.gurt_cog:
|
||||||
|
print("ERROR: ProfileUpdaterTask could not find GurtCog after bot is ready. AI features will not work.")
|
||||||
|
else:
|
||||||
|
print("ProfileUpdaterTask: GurtCog found. Starting loop.")
|
||||||
|
|
||||||
async def perform_update_cycle(self):
|
async def perform_update_cycle(self):
|
||||||
"""Performs a single profile update check and potential update."""
|
"""Performs a single profile update check and potential update."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user