Skip to content

Commit

Permalink
Minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahesh0253 authored Nov 19, 2020
1 parent ac3c3af commit 7fe122f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions plugins/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pyrogram import Client, filters
from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
from info import START_MSG, CHANNELS, ADMINS, COLLECTION_NAME
from utils import Media, db
from utils import Media

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -83,8 +83,7 @@ async def delete(bot, message):
await msg.edit('This is not supported file format')
return

collection = db[COLLECTION_NAME]
result = await collection.delete_one({
result = await Media.collection.delete_one({
'file_name': media.file_name,
'file_size': media.file_size,
'mime_type': media.mime_type,
Expand All @@ -93,4 +92,4 @@ async def delete(bot, message):
if result.deleted_count:
await msg.edit('File is successfully deleted from database')
else:
await msg.edit('File not found in database')
await msg.edit('File not found in database')

0 comments on commit 7fe122f

Please sign in to comment.