This is a Telegram bot designed for group chats, offering multiple interactive and fun functionalities. The bot is built using Python and leverages various APIs to provide jokes, movie information, weather updates, insults, and more.
- Command:
/dadjokes [optional joke]
- Retrieves a random dad joke from icanhazdadjoke.com if no joke is provided.
- If the user provides a joke, it will be displayed instead of fetching one.
- Follows up with an interactive poll for users to rate the joke.
- Command:
/imdb <movie/series name>
- Fetches a list of matching movies and series from OMDB API.
- If only one result is returned, it automatically displays IMDb & Rotten Tomatoes ratings, synopsis, and a link to IMDb.
- If multiple results, users select the correct movie/series via interactive buttons.
- Command:
/weather <location>
- Retrieves the current weather for a given city or UK postcode using Open-Meteo API.
- Special support for Saltney, fetching data from
http://wx.ja91.uk/
weather station. - Special support for Amazingstoke, fetching data from Basingstoke.
- Command:
/insult @username
- Uses Evil Insult API to generate a random insult for the mentioned user.
- Command:
/brl
- Return the current exchange rate for GBPBRL.
- Allows users to specify which currency pair they want to get rates for.
- Every hour, the bot collects messages and generates a summary of the past hour’s discussion.
- Uses Anthropic Claude AI to create concise summaries.
Ensure you have Python 3.11+ installed. Install dependencies:
pip install -r requirements.txt
Create a .env
file and configure your API keys:
TELEGRAM_BOT_TOKEN=your-telegram-bot-token
OMDB_API_KEY=your-omdb-api-key
ANTHROPIC_API_KEY=your-anthropic-api-key
Start the bot manually:
bash src/entry.sh
If deploying via Docker, build and run the container:
docker-compose build
docker-compose up -d
-
This is currently being done via GitHub Actions and builds a multi-architecture image for amd64 and arm64.
-
If you wish to manually push the container to Docker Hub:
docker login
docker build -t your-dockerhub-user/telegram-bot:latest .
docker push your-dockerhub-user/telegram-bot:latest
This project is open-source and available under the MIT License.
If you’d like to improve the bot, feel free to fork the repository and submit a pull request.
💬 Created for Telegram groups to enhance conversations with AI, fun, and utilities! 🚀