Skip to content

About

A smart Telegram recipe bot built with Python and clean architecture. It resolves misspelled dish names and returns curated recipes, photos, and YouTube tutorials.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Telegram Recipe Bot

Telegram bot that accepts a dish name (even misspelled), resolves it to a canonical dish, and returns:

  • 1 photo (optionally a 2-photo collage)
  • a concise recipe (ingredients + steps)
  • a relevant YouTube video link

Designed with clean architecture (ports/adapters) to be maintainable and extensible.

Bot UX / Commands

In Telegram:

  • Use /recipe <dish> (misspellings are ok). If the bot is unsure, it will show “Did you mean…?” buttons.
  • /help: usage + tips
  • /recipe : fetch recipe + photo + YouTube link
  • /prefs: set units/servings/diet
  • /allergens milk,peanut: set allergens (adds warnings when matched)
  • /allergens clear: clear allergens

Quickstart

1) Create a Telegram bot token

Use BotFather and set:

  • TELEGRAM_BOT_TOKEN

2) Get a YouTube API key (recommended)

Create a project in Google Cloud and enable YouTube Data API v3, then set:

  • YOUTUBE_API_KEY

The bot still works without it, but video search will be skipped.

3) Configure environment

Copy .env.example to .env and fill values.

4) Run locally

python -m venv .venv
.venv\\Scripts\\activate
pip install -e ".[dev]"
python -m recipe_bot

Deployment

This project supports webhook mode (recommended for production) or long polling. See .env.example for settings.

Notes about “one message”

Telegram cannot send two separate photos in a single message update (it uses an album, which is multiple messages). If you want “1 update with 2 photos”, enable the collage option to merge 2 images into one.

About

A smart Telegram recipe bot built with Python and clean architecture. It resolves misspelled dish names and returns curated recipes, photos, and YouTube tutorials.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages