Giter Site home page Giter Site logo

tg_push_bot's Introduction

Telegram Push Notifications Bot Update Log

TG推送机器人更新日志

点我添加Bot

在VPS/ECS上搭建Bot Server

Chrome插件

推送消息

Nodejs及Python示例

// using get
curl -X GET https://tgbot.lbyczf.com/sendMessage/:Token?text=HelloWorld

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

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

字段解释

参数 类型 必须 说明
text String True 发送的文字内容
photo URL String False 发送的图片地址,支持HTTPS/HTTP
parse_mode String False 发送文字内容的样式,可以是Markdown或HTML
reply_markup JSON String False 用于控制消息底下的操作按钮
disable_web_page_preview Boolean False 控制是否展示链接的卡片
disable_notification Boolean False 控制是否发送通知

reply_markup可以参考:Telegram Bot API

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

隐私相关

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

更新日志

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后台

感谢支持

感谢

tg_push_bot's People

Contributors

letmedecay avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.