标签: python telegram telegram-bot
如何让机器人删除组中的新消息或最后消息
import telebot import constants bot = telebot.TeleBot(constants.token) LAST_UPDATE_ID = bot.get_updates () [- 1] .update_id, LAST_UPDATE_ID = False bot.getUpdates () [- 1] .update_id
答案 0 :(得分:-1)
您可以使用deleteMessage方法:
请注意,message_id应为update.message.message_id。
message_id
update.message.message_id