mirror of
https://github.com/wlinator/luminara.git
synced 2024-10-02 18:23:12 +00:00
feat: Add delay before executing backup command
This commit is contained in:
parent
7c286a4f82
commit
8229082099
1 changed files with 6 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue