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: 20 days ago
JSON representation
🤖 TeleBot Template for @Vercel
- Host: GitHub
- URL: https://github.com/ponomarevlad/televercelbot
- Owner: PonomareVlad
- Archived: true
- Created: 2021-12-07T13:43:52.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-14T21:36:29.000Z (almost 2 years ago)
- Last Synced: 2024-10-04T14:21:12.748Z (5 months ago)
- Topics: bot, nodejs, telebot, telegram, template, vercel
- Language: HTML
- Homepage:
- Size: 31.3 KB
- Stars: 16
- Watchers: 2
- Forks: 17
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Telegram Bot Template for [Vercel](https://vercel.com)
[](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)