Updated files in classes directory to use new configs. Ensured usages are updated.
This commit is contained in:
@@ -10,6 +10,7 @@ from sqlalchemy import select
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from classes.election import Election
|
||||
from DakinySettings import settings
|
||||
from database_setup.sql_data_classes import UserBirthday, engine
|
||||
from main import birthday_list
|
||||
from utils import get_current_election_cycle
|
||||
@@ -17,8 +18,6 @@ from utils import get_current_election_cycle
|
||||
if TYPE_CHECKING:
|
||||
import nextcord
|
||||
|
||||
from DakinySettings import DakinySettings
|
||||
|
||||
KANDY = 239547993106284544
|
||||
|
||||
|
||||
@@ -76,14 +75,13 @@ class DailyLoop(commands.Cog, name="Daily Loop"):
|
||||
Returns:
|
||||
Election: Current election cycle, None if there is no election happening.
|
||||
"""
|
||||
config: DakinySettings = self.bot.config
|
||||
cycle = get_current_election_cycle(config)
|
||||
cycle = get_current_election_cycle(settings)
|
||||
|
||||
# prevent exception from using cycle as an Int in an array
|
||||
if cycle is None:
|
||||
return None
|
||||
|
||||
return Election(cycle, config, self.bot.get_guild(config.params.guild_id))
|
||||
return Election(cycle, self.bot.get_guild(settings.params.guild_id))
|
||||
|
||||
def update_birthdays(self) -> None:
|
||||
"""Goes through database to collect all birthdays that are today. Adds user's id to birthday list."""
|
||||
|
||||
Reference in New Issue
Block a user