1
Fork 0
mirror of https://github.com/wlinator/luminara.git synced 2024-10-02 16:23:12 +00:00

feat: Add delay before executing backup command

This commit is contained in:
wlinator 2024-09-01 08:25:56 -04:00
parent 7c286a4f82
commit 8229082099

View file

@ -1,3 +1,4 @@
import asyncio
import subprocess
from datetime import datetime
from pathlib import Path
@ -87,6 +88,11 @@ class Backup(commands.Cog):
async def do_backup(self) -> None:
await backup()
@do_backup.before_loop
async def before_do_backup(self) -> None:
await self.bot.wait_until_ready()
await asyncio.sleep(30)
@commands.command()
async def backup(self, ctx: commands.Context[commands.Bot]) -> None:
await backup()