/cancel now removes reply markup

This commit is contained in:
Profitroll 2023-01-05 13:12:22 +01:00
parent b0b0f04a9b
commit 78dee0591c

View File

@ -1,6 +1,6 @@
from app import app from app import app
from pyrogram import filters from pyrogram import filters
from pyrogram.types import Message from pyrogram.types import Message, ReplyKeyboardRemove
from pyrogram.client import Client from pyrogram.client import Client
from modules.utils import should_quote, logWrite, locale from modules.utils import should_quote, logWrite, locale
from modules.database import col_tmp, col_spoilers from modules.database import col_tmp, col_spoilers
@ -11,6 +11,6 @@ from modules import custom_filters
async def command_cancel(app: Client, msg: Message): async def command_cancel(app: Client, msg: Message):
col_tmp.delete_many( {"user": msg.from_user.id} ) col_tmp.delete_many( {"user": msg.from_user.id} )
col_spoilers.delete_many( {"user": msg.from_user.id, "completed": False} ) col_spoilers.delete_many( {"user": msg.from_user.id, "completed": False} )
await msg.reply_text(locale("cancel", "message", locale=msg.from_user), quote=should_quote(msg)) await msg.reply_text(locale("cancel", "message", locale=msg.from_user), quote=should_quote(msg), reply_markup=ReplyKeyboardRemove())
logWrite(f"Cancelling all ongoing tmp operations for {msg.from_user.id}") logWrite(f"Cancelling all ongoing tmp operations for {msg.from_user.id}")
# ============================================================================================================================== # ==============================================================================================================================