add more delay

This commit is contained in:
Nexus 2023-03-16 23:13:08 +00:00
parent 4bad36d938
commit 260bbb9dcb

View file

@ -837,8 +837,8 @@ class OtherCog(commands.Cog):
_io = BytesIO() _io = BytesIO()
engine.save_to_file(text, target_fn) engine.save_to_file(text, target_fn)
engine.runAndWait() engine.runAndWait()
while not os.path.exists(target_fn): while not os.path.exists(target_fn) or os.stat(target_fn).st_size == 0:
sleep(0.5) sleep(2)
with open(target_fn, "rb") as f: with open(target_fn, "rb") as f:
_io.write(f.read()) _io.write(f.read())
os.remove(target_fn) os.remove(target_fn)