Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sxzz/telegram-bot-starter
A starter template for Telegram bots on Serverless, with Vercel, Netlify, Cloudflare, and more support.
https://github.com/sxzz/telegram-bot-starter
bot cloudflare-workers netlify nitro nitropack serverless starter telegraf telegram template typescript vercel
Last synced: 6 days ago
JSON representation
A starter template for Telegram bots on Serverless, with Vercel, Netlify, Cloudflare, and more support.
- Host: GitHub
- URL: https://github.com/sxzz/telegram-bot-starter
- Owner: sxzz
- License: mit
- Created: 2023-11-04T19:56:18.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-09T03:31:24.000Z (16 days ago)
- Last Synced: 2024-12-09T04:24:37.165Z (16 days ago)
- Topics: bot, cloudflare-workers, netlify, nitro, nitropack, serverless, starter, telegraf, telegram, template, typescript, vercel
- Language: TypeScript
- Homepage:
- Size: 368 KB
- Stars: 60
- Watchers: 3
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Telegram Bot Starter
A starter template for Telegram bots on Serverless, with [Vercel](https://vercel.com), [Netlify](https://netlify.com), and [more](https://nitro.unjs.io/deploy) support.
Built top of [Nitro](https://nitro.unjs.io/) and [Telegraf](https://telegraf.js.org).
## Local Development
1. Create a bot with [@BotFather](https://t.me/BotFather), and get the bot token.
2. Clone this repo.
3. Run `pnpm install` to install dependencies.
4. Copy `.env.example` to `.env`, and fill in the `BOT_TOKEN` and `TOKEN` in `.env`.
5. Run `pnpm dev` to start the development server.
6. Expose your local server to the internet with [Local Port Forwarding of VSCode](https://code.visualstudio.com/docs/editor/port-forwarding) (**set Port Visibility to Public**) or [ngrok](https://ngrok.com/).
7. Visit https://your-domain.com/set-webhook?token=TOKEN
8. Send `/start` to your bot.## Deployment
1. Deploy on [Vercel](https://vercel.com), [Netlify](https://netlify.com) or [others](https://nitro.unjs.io/deploy), with `BOT_TOKEN` and `TOKEN` environment variables.
2. Visit https://your-domain.com/set-webhook?token=TOKEN
3. Send `/start` to your bot.## Credits
Thanks to the project [jsjoeio/telegram-bot-template](https://github.com/jsjoeio/telegram-bot-template).
## Sponsors
## License
[MIT](./LICENSE) License © 2024 [三咲智子 Kevin Deng](https://github.com/sxzz)