@@ -37,6 +37,7 @@ class ElectionCycle:
|
||||
Function checks current date to see if something needs to be run.
|
||||
"""
|
||||
today = datetime.today()
|
||||
print("checking the date")
|
||||
|
||||
# check all dates if action is needed
|
||||
if today.date() == self._election_start.dat():
|
||||
@@ -51,6 +52,9 @@ class ElectionCycle:
|
||||
await self.term_start_action()
|
||||
elif today.date() == self._term_end.date():
|
||||
await self.term_end_action()
|
||||
else:
|
||||
print("today was not a special date")
|
||||
print(today)
|
||||
|
||||
async def election_start_action(self) -> None:
|
||||
"""
|
||||
|
||||
@@ -17,7 +17,7 @@ class DailyLoop(commands.Cog, name="Daily Loop"):
|
||||
|
||||
def __init__(self, bot: commands.Bot) -> None:
|
||||
self.bot = bot
|
||||
self.election = ElectionCycle(datetime(2023, 5, 18), datetime(2023, 5, 22), datetime(2023, 5, 23), self.bot)
|
||||
self.election = ElectionCycle(datetime(2023, 5, 19), datetime(2023, 5, 23), datetime(2023, 5, 24), self.bot)
|
||||
|
||||
@commands.Cog.listener()
|
||||
async def on_ready(self):
|
||||
|
||||
Reference in New Issue
Block a user