1
0

fix: time problem

This commit is contained in:
オスカー、 2023-11-24 14:32:54 +09:00
parent 4b9b163e92
commit ef3734e300
No known key found for this signature in database
GPG Key ID: B1EFBBF5C93FF78F

View File

@ -1,5 +1,3 @@
from datetime import datetime
from mipa.ext import commands, tasks
from mipa.ext.commands.bot import Bot
@ -13,10 +11,6 @@ class Post(commands.Cog):
@tasks.loop(seconds=1800)
async def _postLine(self) -> None:
now = datetime.now()
if now.minute not in [30, 00]: # Only post in n:30 and n:00
return
line = self.bot.get_random_line()
while line in self.posted:
line = self.bot.get_random_line()