Adjust post frequency

cachapa
Captain Arepa 11 months ago
parent af52982b11
commit b577623c5e

@ -49,6 +49,11 @@ class MyBot(commands.Bot):
text = roboduck.create_sentence()
await bot.client.note.action.send(content=text, visibility="public", cw=contentwarning)
@tasks.loop(seconds=3600)
async def loop_2h(self):
text = roboduck.create_sentence()
await bot.client.note.action.send(content=text, visibility="public", cw=contentwarning)
@tasks.loop(seconds=600)
async def loop_10m(self):
text = roboduck.create_sentence()
@ -72,7 +77,8 @@ class MyBot(commands.Bot):
content=roboduck.datetime.now().strftime('%Y-%m-%d %H:%M:%S') + " Roboduck Bot started!",
visibility="specified")
self.loop_12h.start() # Launching renew posts every 12 hours
self.loop_1h.start() #
# self.loop_1h.start() #
self.loop_2h.start() #
# self.loop_10m.start()
self.loop_custom.start() # Custom duration bot
print(roboduck.datetime.now().strftime('%Y-%m-%d %H:%M:%S') + " Roboduck Bot started!")

Loading…
Cancel
Save