Could I pass self when dealing with tasks in extensations?
@Task.create(IntervalTrigger(seconds=5))
now = datetime.datetime.now(self.timezoneInfo)
if x.now().hour == 8 and x.now().minute == 0 and self.alreadyposted == False:
self.alreadyposted = True
question = self.random_qotd_question()
if question == None:
user = self.client.get_user(247036279420747776)
await user.send("You ran out of questions in the database.")
return
guild = await self.client.fetch_guild(864557936068395018)
channel = await guild.fetch_channel(1095806073639805019)
embed = Embed("Question of the Day")
embed.add_field("Question", question)
embed.color = Color.from_rgb(201, 234, 252)
await channel.send("<@&890470398192402493>", embeds=embed)
elif x.now().hour != 8 and x.now().minute != 0 and self.alreadyposted == True:
self.alreadyposted = False