Skip to content

Latest commit

 

History

History
89 lines (52 loc) · 3.95 KB

README.md

File metadata and controls

89 lines (52 loc) · 3.95 KB

TG推送机器人 Telegram Push Notifications Bot

更新日志 Update Log

Forked from Fndroid/tg_push_bot

点我添加Bot --- Click here to add this bot to your telegram

在VPS/ECS上搭建Bot Server --- Creat your own Bot Server

Chrome插件 --- Chrom Plugin

推送消息 Push Notifications

Nodejs及Python示例 --- demo for Node.JS && Python

// using get
curl -X GET https://tgmsgbot.begabung.site/notifyME/sendMessage/:Token?text=HelloWorld

// using post
curl -d "text=Helloworld&photo=https%3A%2F%2Fgithub.com%2F46EULER%2Ftg_push_bot%2Fblob%2Fmaster%2Fimgs%2Fphoto_2018-04-21_15-29-55.jpg%3Fraw%3Dtrue" -X POST https://tgmsgbot.begabung.site/notifyME/sendMessage/:Token

GET调用的URL长度会有限制,所以如果要发送图片或者发送内容较长,请使用POST

Length of URL is limited by GET Method. POST Method is preferred if seding Picture or long text.

字段解释 description of parameters

参数Param Name 类型Type 必须Must-use 说明Description
text String True 发送的文字内容 --- Contained text
photo URL String False 发送的图片地址,支持HTTPS/HTTP --- Pic url. HTTPS/HTTP prefix is supported
parse_mode String False 发送文字内容的样式,可以是MarkdownV2或HTML --- Type of contained text could be MarkdownV2 or HTML
reply_markup JSON String False 用于控制消息底下的操作按钮
disable_web_page_preview Boolean False 控制是否展示链接的卡片
disable_notification Boolean False 控制是否发送通知 --- Show device(Mac/iOS/Win etc.) notification or not.

reply_markup可以参考:Telegram Bot API

当photo存在时,text不必须存在(即可以单独发送图片)

隐私相关 Privicy

Bot不会识别和储存任何用户推送的消息,只会将推送消息发送给Telegram服务器。Bot只会记录用户会话ID,此ID是向Telegram推送消息的凭据。

This bot doesn't record or analysis any data pushed by end users. Messages received from user would be forword to Telegram Server directly. Only ChatID is recorded while end user start using this bot. As you know, the ChatID is required by Telegram to push message correctly.

更新日志 Update Log

2020.05.08

  1. 增加uuid生成功能,向机器人发送‘UUID’可返回一串uuid。 2. 发送“/help”可返回简略的提示function of creating uuid string is online.

2018.04.20

  1. 增加POST请求支持,接受格式为JSONx-www-form-urlencoded
  2. 增加属性parse_modereply_markupdisable_web_page_preview设置,具体参考:Telegram Bot API
  3. 增加通过URL发送图片,字段为photo,参考:Telegram Bot API,(如果有photo字段,则text自动理解为caption)
  4. 请求改为同步返回并将对Telegram的请求响应直接回复给请求者

2018.04.21

  1. 支持属性disable_notification,可以静默发送消息,采集记录用途

2018.04.22

  1. 增加Chrome插件支持,可以通过插件向Telegram推送图片、链接和文字内容,具体参考:TG推送插件

2018.04.24

  1. 当图片地址为Http时,当作text处理

2018.04.26

  1. 给Telegram X增加一个推送非HTTP(S)链接的折中方法,将链接URL编码后链接到https://tgbot.lbyczf.com/redirectTo?url=后,在Telegram X打开后会重定向

2018.04.27

  1. 代码已经上传,可以参考配置说明在自己的VPS/ECS上搭建Bot后台

感谢支持

感谢