Skip to content

Simple Serverless Telegram Bot Using Telegram Webhooks, Hostable on Cloudflare Workers

License

Notifications You must be signed in to change notification settings

bitwisebro/Serverless-Telegram-Bot

Repository files navigation

Telegram Bot Worker Demo

This repository contains a sample Telegram bot built to run on Cloudflare Workers. The bot serves as a lightweight, serverless application that can be easily deployed and scaled without needing a dedicated server.

Features

  • Serverless Deployment: The bot is hosted on Cloudflare Workers, making it highly scalable and cost-efficient.
  • Easy Configuration: Minimal setup required using wrangler.toml for environment variables and worker settings.
  • Lightweight: Built with minimal dependencies to ensure quick response times and low overhead.

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/bitwisebro/telegram-bot-worker-demo.git
    cd telegram-bot-worker-demo
  2. Install dependencies:

    npm install
  3. Deploy to Cloudflare Workers:

    wrangler publish

Usage

Once deployed, your bot will be live and can respond to messages sent to your Telegram bot. You can expand its functionality by editing the src/index.js file and redeploying.

Project Structure

  • src/index.js: Main bot logic and handler functions.
  • wrangler.toml: Configuration file for Cloudflare Workers deployment.

Setup

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

Simple Serverless Telegram Bot Using Telegram Webhooks, Hostable on Cloudflare Workers

Topics

Resources

License

Stars

Watchers

Forks