Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ponomarevlad/televercelbot
🤖 TeleBot Template for @Vercel
https://github.com/ponomarevlad/televercelbot
bot nodejs telebot telegram template vercel
Last synced: 3 months ago
JSON representation
🤖 TeleBot Template for @Vercel
- Host: GitHub
- URL: https://github.com/ponomarevlad/televercelbot
- Owner: PonomareVlad
- Created: 2021-12-07T13:43:52.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-22T13:08:20.000Z (almost 2 years ago)
- Last Synced: 2023-03-02T03:52:03.788Z (almost 2 years ago)
- Topics: bot, nodejs, telebot, telegram, template, vercel
- Language: HTML
- Homepage: https://telebot-template.vercel.app
- Size: 49.8 KB
- Stars: 6
- Watchers: 1
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Telegram Bot Template for [Vercel](https://vercel.com)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FPonomareVlad%2FTeleVercelBot&env=TELEGRAM_BOT_TOKEN&envDescription=Telegram%20Bot%20Token%20from%20%40BotFather&project-name=telegram-bot&repo-name=telegram-bot)
> Try [new experimental version for Edge Functions](https://github.com/PonomareVlad/TeleVercelEdgeBot) ✨
### Run locally
#### 1. Install [Vercel CLI](https://vercel.com/docs/cli)
```bash
npm i -g vercel
```#### 2. Install [CloudFlare tunnel](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/do-more-with-tunnels/trycloudflare/) (`cloudflared`)
[Download link](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/installation/)
#### 3. Then run local dev server with tunnel
```bash
npm run dev-with-tunnel
```And open link from terminal (ends with `*.trycloudflare.com`) to set WebHook
Now you can make some changes in [src/bot.mjs](src/bot.mjs)
[Documentation for TeleBot](https://github.com/mullwar/telebot)
### Template structure:
- [api/telegram.mjs](api/telegram.mjs) — Endpoint function for WebHooks
- [api/setWebhook.mjs](api/setWebhook.mjs) — Function for setting WebHook URL###### P.S. Don't forget to remove or restrict [api/setWebhook.mjs](api/setWebhook.mjs) function before going to production
Made with 💜 by [Vladislav Ponomarev](https://GitHub.com/PonomareVlad)