Trying to figure out why the elections are not starting.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user