【发布时间】:2021-01-06 01:53:25
【问题描述】:
我使用 pytelegrambotapi 库在电报中制作我的机器人。
这是我的代码:
import config
import telebot
bot = telebot.TeleBot(config.token)
@bot.message_handler(commands=['start'])
def handle_start_message(message):
bot.send_message(message.chat.id, "Hello. I'm your bot")
print(message.text)
我想要做的是在我的命令行中返回消息文本。它什么也不返回,但是,机器人正在工作,因为它会在电报中回复我。
【问题讨论】:
-
你试过python
logging模块吗?
标签: python telegram py-telegram-bot-api