📜  消息处理程序 python 电报机器人示例 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:21.629000             🧑  作者: Mango

代码示例1
def echo(update, context):
    context.bot.send_message(chat_id=update.effective_chat.id, text=update.message.text)

from telegram.ext import MessageHandler, Filters
echo_handler = MessageHandler(Filters.text & (~Filters.command), echo)
dispatcher.add_handler(echo_handler)