https://github.com/ponomarevlad/docnamerbot
✏️ Document renaming bot
https://github.com/ponomarevlad/docnamerbot
Last synced: 4 months ago
JSON representation
✏️ Document renaming bot
- Host: GitHub
- URL: https://github.com/ponomarevlad/docnamerbot
- Owner: PonomareVlad
- Archived: true
- Created: 2023-04-28T21:06:01.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-27T16:26:29.000Z (about 2 years ago)
- Last Synced: 2024-10-03T14:22:11.735Z (8 months ago)
- Language: JavaScript
- Homepage: https://t.me/DocnamerBot
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Telegram Bot Template for [Vercel Serverless Functions](https://vercel.com/docs/concepts/functions/serverless-functions)
[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FPonomareVlad%2FgrammYVercel&env=TELEGRAM_BOT_TOKEN&envDescription=Telegram%20Bot%20Token%20from%20%40BotFather&envLink=https%3A%2F%2Fcore.telegram.org%2Fbots%2Ftutorial%23obtain-your-bot-token&project-name=grammy-vercel&repository-name=grammy-vercel)
### 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 grammY](https://grammy.dev)
### Template structure:
- [api/update.mjs](api/update.mjs) — Function for receiving WebHooks
- [api/webhook.mjs](api/webhook.mjs) — Function for setting WebHook URL###### P.S. Don't forget to remove or restrict [api/webhook.mjs](api/webhook.mjs) function before going to production
Made with 💜 by [Vladislav Ponomarev](https://GitHub.com/PonomareVlad)