Fix stupid oianwgionaoiwgnonwg

This commit is contained in:
nexy7574 2023-09-09 22:41:39 +01:00
parent 0d1240273d
commit 86d992efa0

View file

@ -1012,7 +1012,6 @@ class OtherCog(commands.Cog):
try: try:
bak = file.with_name(file.name + "-" + os.urandom(4).hex()) bak = file.with_name(file.name + "-" + os.urandom(4).hex())
shutil.copy(str(file), str(bak)) shutil.copy(str(file), str(bak))
file.unlink()
minutes, seconds = divmod(timestamp, 60) minutes, seconds = divmod(timestamp, 60)
hours, minutes = divmod(minutes, 60) hours, minutes = divmod(minutes, 60)
_args = [ _args = [
@ -1039,7 +1038,7 @@ class OtherCog(commands.Cog):
capture_output=True capture_output=True
) )
) )
shutil.move(str(bak), str(file)) bak.unlink(True)
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
traceback.print_exc() traceback.print_exc()
return await ctx.edit( return await ctx.edit(