Set up bot to do initial test. Made changes in class to make test take less time.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user