Skip to content

Commit 7a4d84a

Browse files
authored
deletes thumb on db too
1 parent 5c74ad7 commit 7a4d84a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

unzipper/modules/ext_script/custom_thumbnail.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from config import Config
77
from unzipper import LOGGER
88
from unzipper.modules.bot_data import Buttons, Messages
9+
from unzipper.helpers.database import del_thumb_db
910
"""
1011
async def thumb_keyboard():
1112
keyboard = InlineKeyboard(row_width=2)
@@ -101,7 +102,9 @@ async def save_thumb(_, message):
101102

102103

103104
async def del_thumb(_, message):
104-
thumb_location = Config.THUMB_LOCATION + "/" + str(message.from_user.id)
105+
id = message.from_user.id
106+
thumb_location = Config.THUMB_LOCATION + "/" + str(id)
107+
await del_thumb_db(id)
105108
try:
106109
os.remove(thumb_location + ".jpg")
107110
except:

0 commit comments

Comments
 (0)