Skip to content

codebam/cwtb-consumer

Repository files navigation

CF Workers Telegram Bot Consumer Template

This is a template for creating a Telegram Bot using @codebam/cf-workers-telegram-bot on Cloudflare Workers.

Getting Started

  1. Install dependencies:

    npm install
  2. Configure wrangler: Edit wrangler.toml and change the name to your bot's name.

  3. Set your Telegram Token:

    npx wrangler secret put SECRET_TELEGRAM_API_TOKEN
  4. Develop:

    npm run dev
  5. Deploy:

    npm run deploy
  6. Set Webhook: https://<your-worker>.<your-subdomain>.workers.dev/<SECRET_TELEGRAM_API_TOKEN>/setWebhook

Project Structure

  • src/index.ts: The main entry point where you define your bot and handlers.
  • test/index.spec.ts: Unit tests for your bot.
  • wrangler.toml: Cloudflare Workers configuration.

About

Telegram Bot using cf-workers-telegram-bot as a library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors