如何使用python持续检查进入我的电报机器人的消息?

问题描述 投票:0回答:1

我正在尝试电报机器人和python。我的问题是如何使我的python程序持续检查发送到电报机器人的消息?

例如:

while checkForIncomingMessages:
    print(latestMessage)
    if latestMessage == "ifconfig":
       # execute ifconfig command on laptop

提前感谢!

python python-3.x chatbot telegram-bot python-telegram-bot
1个回答
0
投票

[telegrambot的github页面上有一些示例bot。

echobot2

© www.soinside.com 2019 - 2024. All rights reserved.