Feat: Add some logging.
build_develop / build (push) Successful in 43s

Trying to figure out why the elections are not starting.
This commit is contained in:
2025-05-25 22:24:26 -04:00
parent f3985b5d21
commit 4f4d76d151
3 changed files with 23 additions and 3 deletions
+5
View File
@@ -4,6 +4,7 @@ import random
from datetime import UTC, datetime, time
from typing import TYPE_CHECKING
from logger import dakiny_logger
from nextcord.ext import commands, tasks
from pytz import timezone
from sqlalchemy import select
@@ -43,8 +44,10 @@ class DailyLoop(commands.Cog, name="Daily Loop"):
an active election, runs the check_date() function for the election to perform actions. Finally checks if the
election is over to delete the current election object.
"""
dakiny_logger.debug("Daily loop.")
if self.current_election is None:
self.current_election = self.get_election()
dakiny_logger.debug("Current election: %s", self.current_election)
if self.current_election is not None:
await self.current_election.check_date()
@@ -85,6 +88,8 @@ class DailyLoop(commands.Cog, name="Daily Loop"):
election = Election(cycle, self.bot.get_guild(settings.params.guild_id))
dakiny_logger.debug("Election active: %s", election.active)
return election if election.active else None
def update_birthdays(self) -> None: