我在 cmd 和 Pycharm 中都尝试了以下代码。它在 cmd 中运行良好,但结果证明该代码在 Pycharm 中运行不佳。我无法获得任何更新,并且该过程刚刚完成。我能知道如何解决这个问题吗?PS:当我将 run_as_thread 更改为 run_forever() 时,它在 Pycharm 中工作
import telepot
from pprint import pprint
from telepot.loop import MessageLoop
bot = telepot.Bot("999999999999999999")
def handle(msg):
pprint(msg)
a = MessageLoop(bot, handle).run_as_thread()