from __future__ import annotations from contextlib import suppress from typing import Any from pyrogram.types import ReplyKeyboardRemove async def remove_reply_keyboard(message: Any) -> None: """Remove a stale Telegram reply keyboard without leaving a chat message.""" notice = await message.reply_text( "正在打开消息内菜单…", reply_markup=ReplyKeyboardRemove(selective=False), ) with suppress(Exception): await notice.delete()