Create a Telegram bot via @BotFather
Open Telegram and start a conversation with @BotFather.Follow the prompts to choose a name and username for your bot. BotFather will return a BOT_TOKEN that looks like:Keep this token — you will need it in a later step.
Get an OpenAI API key
Go to platform.openai.com/api-keys and create a new secret key.The bot uses
gpt-4o-mini by default. This model is the most cost-efficient option and is more than sufficient for deal curation. Make sure your account has credits or a payment method attached.Configure environment variables
Copy the example file and fill in your credentials:The At minimum, set these two required variables in your
All other variables are optional and have sensible defaults.
.env.example file contains:.env:| Variable | Required | Default | Description |
|---|---|---|---|
BOT_TOKEN | Yes | — | Telegram bot token from @BotFather |
OPENAI_API_KEY | Yes | — | OpenAI API key |
OPENAI_MODEL | No | gpt-4o-mini | OpenAI model to use for curation |
Start the bot in development mode
The available npm scripts are:Run the bot with hot-reload using:You should see:
Send /start to your bot
Open Telegram, search for the username you gave your bot in Step 1, and send:The bot will confirm that you are now subscribed to daily deal notifications.
Send /deals to get your first deal list
There is a 45-second cooldown between
/deals requests per chat to prevent abuse. If you send the command again too quickly, the bot will tell you how many seconds remain.