Skip to content

3. Setup & Installation

Aditya Sharma edited this page May 7, 2024 · 3 revisions

⚙️ Setup:

Follow the steps to setup Flaregram on your environment:

  1. Clone the repo locally and changing into directory with:
git clone https://github.com/adityash4rma/flaregram.git
cd flaregram

📁 Renaming wrangler_sample.toml to wrangler.toml:

Use any file explorer or cmd/bash/powershell to rename, here am using powershell -

Rename-Item .\wrangler_sample.toml .\wrangler.toml

🗒️ Adding Environment Variables:

  1. BOT_TOKEN

It is the Bot Token of your Telegram Bot, can be obtained from @botfather (on telegram), How to Get BOT_TOKEN

  1. WEBHOOK_URL

The webhook url with the format cloudflare workers domain/bot, i.e. https://myworker.mysubdomain.workers.dev/bot, the endpoint should be /bot and nothing else.

  1. SECRET_TOKEN (optional)

The token is useful to ensure that the request sent from our bot is sent by us. Token should be 1-256 characters. Only characters A-Z, a-z, 0-9, _ and - are allowed.

  1. DROP_PENDING_UPDATES (optional)

Set True to drop all pending updates.


🔧 Installations:

  1. Install the package in package.json by:
npm install

That's it! Move on to the next step!



Continue reading...

🔗 Using the framework

Clone this wiki locally