Remove config param from get_quarter_name().
This commit is contained in:
@@ -69,7 +69,7 @@ def get_election_name() -> str:
|
||||
return f"vote-{get_datetime(current_cycle.term_start).year}-{current_cycle.name}"
|
||||
|
||||
|
||||
def get_quarter_name(config: DakinySettings) -> str:
|
||||
def get_quarter_name() -> str:
|
||||
"""
|
||||
Builds the name of the current cycle/quarter.
|
||||
|
||||
@@ -79,8 +79,8 @@ def get_quarter_name(config: DakinySettings) -> str:
|
||||
Returns:
|
||||
str: the name of the cycle.
|
||||
"""
|
||||
cycle = get_quarter_cycle(config)
|
||||
current_cycle = config.election_cycles[cycle]
|
||||
cycle = get_quarter_cycle(settings)
|
||||
current_cycle = settings.election_cycles[cycle]
|
||||
|
||||
return f"{get_datetime(current_cycle.term_start).year}-{current_cycle.name}"
|
||||
|
||||
@@ -312,7 +312,7 @@ def record_event_points(config: DakinySettings, users: Sequence[str], add_points
|
||||
add_points (int): number of points to add
|
||||
is_member (bool): whether the users are a discord member or not
|
||||
"""
|
||||
quarter_name = get_quarter_name(config)
|
||||
quarter_name = get_quarter_name()
|
||||
with Session(engine) as session:
|
||||
for user in users:
|
||||
stmt = select(EventPoints).where(EventPoints.UserId == user).where(EventPoints.QuarterName == quarter_name)
|
||||
@@ -537,7 +537,7 @@ async def edit_clan_council_info(guild: nextcord.Guild, config: DakinySettings)
|
||||
f"<@{user_id}>" for user_id in council_member_ids if user_id not in (discord_manager, clan_leader)
|
||||
]
|
||||
|
||||
quarter = get_quarter_name(config)
|
||||
quarter = get_quarter_name()
|
||||
|
||||
async with aiofiles.open(f"{TEMPLATES_DIR}/council_members.txt", encoding="utf8") as file:
|
||||
message = await file.read()
|
||||
|
||||
Reference in New Issue
Block a user