All Projects → anhao → Tgmessage

anhao / Tgmessage

TG 消息推送机器人

Projects that are alternatives of or similar to Tgmessage

Spider Less
Web spider as a service, spider on serverless
Stars: ✭ 172 (+352.63%)
Mutual labels:  api, serverless
Mist
Serverless proxy for Spark cluster
Stars: ✭ 309 (+713.16%)
Mutual labels:  api, serverless
Autoserver
Create a full-featured REST/GraphQL API from a configuration file
Stars: ✭ 188 (+394.74%)
Mutual labels:  api, serverless
Novagram
An Object-Oriented PHP library for Telegram Bots
Stars: ✭ 112 (+194.74%)
Mutual labels:  api, telegram-bot
Octo Cli
CLI tool to expose data from any database as a serverless web service.
Stars: ✭ 653 (+1618.42%)
Mutual labels:  api, serverless
Apisix Docker
the docker for Apache APISIX
Stars: ✭ 119 (+213.16%)
Mutual labels:  api, serverless
Dialetus Service
API to Informal dictionary for the idiomatic expressions that each Brazilian region It has
Stars: ✭ 202 (+431.58%)
Mutual labels:  api, serverless
Up
Up focuses on deploying "vanilla" HTTP servers so there's nothing new to learn, just develop with your favorite existing frameworks such as Express, Koa, Django, Golang net/http or others.
Stars: ✭ 8,439 (+22107.89%)
Mutual labels:  api, serverless
Apisix
The Cloud-Native API Gateway
Stars: ✭ 7,920 (+20742.11%)
Mutual labels:  api, serverless
Para
Open source back-end server for web, mobile and IoT. The backend for busy developers. (self-hosted or hosted)
Stars: ✭ 389 (+923.68%)
Mutual labels:  api, serverless
Json Serverless
Transform a JSON file into a serverless REST API in AWS cloud
Stars: ✭ 108 (+184.21%)
Mutual labels:  api, serverless
Fusio
Open source API management platform
Stars: ✭ 946 (+2389.47%)
Mutual labels:  api, serverless
Telebot.nim
Async client for Telegram Bot API in pure Nim [Bot API 5.1]
Stars: ✭ 93 (+144.74%)
Mutual labels:  api, telegram-bot
Graphql Genie
Simply pass in your GraphQL type defintions and get a fully featured GraphQL API with referential integrity, inverse updates, subscriptions and role based access control that can be used client side or server side.
Stars: ✭ 147 (+286.84%)
Mutual labels:  api, serverless
Best Of Web Python
🏆 A ranked list of awesome python libraries for web development. Updated weekly.
Stars: ✭ 1,118 (+2842.11%)
Mutual labels:  api, serverless
Aws Lambda Fastify
Insipired by aws-serverless-express to work with Fastify with inject functionality.
Stars: ✭ 190 (+400%)
Mutual labels:  api, serverless
Aws Serverless Java Container
A Java wrapper to run Spring, Jersey, Spark, and other apps inside AWS Lambda.
Stars: ✭ 1,054 (+2673.68%)
Mutual labels:  api, serverless
Serverless Es Logs
A Serverless plugin to transport logs to ElasticSearch
Stars: ✭ 51 (+34.21%)
Mutual labels:  api, serverless
Lib
Autocode CLI and standard library tooling
Stars: ✭ 3,773 (+9828.95%)
Mutual labels:  api, serverless
Lambda Api
Lightweight web framework for your serverless applications
Stars: ✭ 929 (+2344.74%)
Mutual labels:  api, serverless

TG Bot

TG 消息推送机器人,基于 vercel 函数搭建的TG消息推送机器人,无需服务器。

搭建教程

Deploy to Vercel

Deploy to Vercel

建立 TG 机器人

1.首先关注 BotFather

  1. 创建机器人,关注 BotFather 之后,发送 /newboot 开始创建 Bot 第一次输入机器人名称,第二次输入机器人 username 需要以 bot 结尾 oEENc.png

3.获取机器人 token

创建成功之后会发送一条消息给你,里面就包含了 token

oEGEr.png

设置机器人 Command 设置获取 token 命令 首先给 BotFather 发送 /mybots,然后点击你刚才创建的机器人,再点击 Edit Bot, 继续点击 Edit Commands。 然后输入

token - 获取token

这样就设置好了一个 commands

oEQIM.png oE0FG.png oEcR1.png oEd9I.png

部署到 Vercel

点击首页的 Deploy 跳到 vercel oSgul.png

输入项目名,然后确认

oSpFg.png

确认之后会直接部署到 vercel

设置环境变量

vercel 部署好了之后,然后设置环境变量

在控制台点击你创建好的项目,然后点击设置,添加环境变量

设置vercel 环境变量

需要设置4个环境变量,1个是必填的

token: bot 机器人的token
sign_key: 加密 chat_id 需要用到,不设置默认为 abc
url: webhook 回调地址, 不设置的话请求 setWebhook 时需要手动加参数, webhook url 地址为:https://你的域名/webhook
key: 设置 webhook 的请求参数

oSJRB.png

上面的环境变量设置好了之后,可能不会立马生效,你可以重新构建一下函数

oSP9s.png

设置回调

设置 webhook ,可以直接通过浏览器请求来设置

webhook地址为:https://你的域名/webhook

浏览器窗口打开:https://你的域名/setwebhook?key=环境变量设置的KEY&url=你的webhook地址

code 返回 200 就是设置成功了~

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].