大家好。请帮我写一个装饰器来删除以前的消息。有一个函数:
def func(call, bot):
bot.send_message(
call.from_user.id,
"Привет!",
reply_markup=button()
)
装饰器应该在 bot.send_message 之前添加这一行:
bot.delete_message(call.from_user.id, call.message.message_id)
如果我理解正确的话: