mirror of
https://github.com/UiO-Gaming/mustafa.git
synced 2026-11-05 13:56:48 +01:00
clean up pre-nightcore downloaded songs
This commit is contained in:
1 parent
fb078d48df
commit
73ce8d2f2b
1 file changed
+5
-5
+5
-5
@@ -259,11 +259,11 @@ class Meme(commands.Cog):
|
||||
ephemeral=True,
|
||||
)
|
||||
|
||||
try:
|
||||
os.remove(nightcored)
|
||||
os.remove(pre_nightcored)
|
||||
except (FileNotFoundError, PermissionError):
|
||||
self.bot.logger.warn("Failed to remove temporary files")
|
||||
for temp_file in (nightcored, f"{pre_nightcored}.mp3"):
|
||||
try:
|
||||
os.remove(temp_file)
|
||||
except (FileNotFoundError, PermissionError):
|
||||
self.bot.logger.warn(f"Failed to remove temporary file {temp_file}")
|
||||
|
||||
@app_commands.checks.bot_has_permissions(attach_files=True)
|
||||
@app_commands.checks.cooldown(1, 60)
|
||||
|
||||
Reference in new issue
Block a user