Change ElectionCycle class to Election. Change ElectionCycle column in database to ElectionName. Update some variables for clarification.

This commit is contained in:
2024-09-03 11:24:28 -04:00
parent 306e0d687a
commit eb5102578d
10 changed files with 71 additions and 79 deletions
+8 -8
View File
@@ -5,7 +5,7 @@ from typing import TYPE_CHECKING
import nextcord
from nextcord.ext import application_checks, commands
from classes.election_cycle import ElectionCycle
from classes.election import Election
from utils import GUILDS, get_current_election_cycle
if TYPE_CHECKING:
@@ -45,7 +45,7 @@ class TestCog(commands.Cog, name="Test commands."):
interaction (nextcord.Interaction): Interaction with the message.
"""
config: DakinyConfig = self.bot.config
cycle = ElectionCycle(
cycle = Election(
get_current_election_cycle(config),
config,
self.bot.get_guild(config.params.guild_id),
@@ -63,7 +63,7 @@ class TestCog(commands.Cog, name="Test commands."):
interaction (nextcord.Interaction): Interaction with the message.
"""
config: DakinyConfig = self.bot.config
cycle = ElectionCycle(
cycle = Election(
get_current_election_cycle(config),
config,
self.bot.get_guild(config.params.guild_id),
@@ -81,7 +81,7 @@ class TestCog(commands.Cog, name="Test commands."):
interaction (nextcord.Interaction): Interaction with the message.
"""
config: DakinyConfig = self.bot.config
cycle = ElectionCycle(
cycle = Election(
get_current_election_cycle(config),
config,
self.bot.get_guild(config.params.guild_id),
@@ -99,7 +99,7 @@ class TestCog(commands.Cog, name="Test commands."):
interaction (nextcord.Interaction): Interaction with the message.
"""
config: DakinyConfig = self.bot.config
cycle = ElectionCycle(
cycle = Election(
get_current_election_cycle(config),
config,
self.bot.get_guild(config.params.guild_id),
@@ -117,7 +117,7 @@ class TestCog(commands.Cog, name="Test commands."):
interaction (nextcord.Interaction): Interaction with the message.
"""
config: DakinyConfig = self.bot.config
cycle = ElectionCycle(
cycle = Election(
get_current_election_cycle(config),
config,
self.bot.get_guild(config.params.guild_id),
@@ -135,7 +135,7 @@ class TestCog(commands.Cog, name="Test commands."):
interaction (nextcord.Interaction): Interaction with the message.
"""
config: DakinyConfig = self.bot.config
cycle = ElectionCycle(
cycle = Election(
get_current_election_cycle(config),
config,
self.bot.get_guild(config.params.guild_id),
@@ -153,7 +153,7 @@ class TestCog(commands.Cog, name="Test commands."):
interaction (nextcord.Interaction): Interaction with the message.
"""
config: DakinyConfig = self.bot.config
cycle = ElectionCycle(
cycle = Election(
get_current_election_cycle(config),
config,
self.bot.get_guild(config.params.guild_id),