From c80eefcf0ebafec79830da703261d06e98561aef Mon Sep 17 00:00:00 2001 From: Mark Hoekveen Date: Thu, 6 Jun 2019 13:50:28 +0200 Subject: [PATCH] Graceful fail on deletion of gif --- General.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/General.py b/General.py index 8ba6a9d..88567bf 100644 --- a/General.py +++ b/General.py @@ -91,7 +91,10 @@ class General(object): yield from ctx.message.delete() except: print("No permission to delete message") - os.remove('temp') + try: + os.remove('temp') + except: + pass ydl_opts = { 'outtmpl': 'temp', 'format': 'bestvideo[ext=mp4]/mp4'