Git Product home page Git Product logo

telegram-pm-bot's Introduction

Telegram PM Bot

这是一个 TG 私聊 Bot 的 Node.js 实现,可以在 Vercel 上运行。

如何使用

  1. Fork 本仓库
  2. 在 Vercel 中导入项目
  3. 在 Vercel 项目的环境变量中增加如下内容:
环境变量名 内容 备注
TG_TOKEN Telegram Bot 的 Token
SECRET_TOKEN PM Bot 使用的 Token 在 TG 调用我们的 WebHook 的过程中传递,以保证消息是由 TG 的服务器发出的。
ADMIN_ID Bot 管理员的 Uid
  1. 在本地使用 curl 命令,向 Bot 添加钩子(替换尖括号里面的内容)。该 PM Bot 的 WebHook 地址通常是 https://<项目使用的域名>/api/update
curl --request POST --url https://api.telegram.org/bot<Telegram 的 Token>/setWebhook --header 'content-type: application/json' --data '{"url": "<WebHook 地址>", "secret_token": "<PM Bot 的 SecretToken>"}'

驾照

Apache 2.0

telegram-pm-bot's People

Contributors

qyl27 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.