Set up bot to do initial test. Made changes in class to make test take less time.

This commit is contained in:
2023-05-15 11:34:14 -04:00
parent d3858a7ba1
commit 6c9de43e73
2 changed files with 43 additions and 15 deletions
+6 -4
View File
@@ -2,11 +2,13 @@
_summary_
"""
import nextcord
from datetime import datetime, time
from nextcord.ext import commands, tasks
from datetime import time
from pytz import timezone
from classes.election_cycle import ElectionCycle
class DailyLoop(commands.Cog, name="Daily Loop"):
"""
@@ -15,6 +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, 16), datetime(2023, 5, 20), datetime(2023, 5, 21), self.bot)
@commands.Cog.listener()
async def on_ready(self):
@@ -28,5 +31,4 @@ class DailyLoop(commands.Cog, name="Daily Loop"):
@tasks.loop(time=time(hour=0, tzinfo=timezone("GMT")))
async def do_thing(self):
""" """
imcompiling: nextcord.User = await self.bot.fetch_user(206602713511886849)
await imcompiling.send("its reset in runescape")
await self.election.check_date()