Open itgoyo opened 1 year ago
# -*- coding: utf-8 -*- import telebot # 在 https://core.telegram.org/bots#3-how-do-i-create-a-bot 获取您的 telegram bot token bot_token = '211xxx5926:AAF4p7xxxxxQoCWyrUywVEBQ9U72VA5D7v8'; # 在 https://t.me/botfather 获取您的 telegram bot id bot_chatID = '21141xxxx36'; bot = telebot.TeleBot(bot_token); bot.send_message(bot_chatID, "您要发送的文本内容");
安装依赖:
python3 -m pip install --user telebot
程序运行:
python3 tg.py
想知道对应的chatid的话就在群组里面@get_id_bot,就可以拿到对应的chatid
chatid
@get_id_bot
最后推送成功的时候,不知道为啥推送到了之前创建的青龙机器人里面了
青龙机器人
安装依赖:
程序运行:
想知道对应的
chatid
的话就在群组里面@get_id_bot
,就可以拿到对应的chatid
最后推送成功的时候,不知道为啥推送到了之前创建的
青龙机器人
里面了