1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > 使用python Telegram 机器人推送消息

使用python Telegram 机器人推送消息

时间:2023-02-06 07:42:54

相关推荐

使用python  Telegram 机器人推送消息

环境安装

也可以通过pip安装

pip install python-telegram-bot

或者通过源码安装

$ git clone /python-telegram-bot/python-telegram-bot --recursive$ cd python-telegram-bot$ python setup.py install

一、注册机器人获取api

关注@BotFather用户

I can help you create and manage Telegram bots. If you're new to the Bot API, please see the manual (/bots).You can control me by sending these commands:/newbot - 创建一个机器人账号/mybots - 修改急切五年配置

(第一次输入的为name,第二次输入的为bot的 id)

二、把机器人拉入频道(必须设置为管理员)

三、运用机器人推送消息

下面为发送文本、网址和图片的方法

项目地址:

/SaltNego/telegram_python_bot/tree/master

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。