Tibo.app - Theory of inventive based offers @meteoritt
Telegram bot @albert_ai_bot (https://t.me/albert_ai_bot)
Open Source Code (Π‘ΠΠ): https://github.com/ruopsdev/tibo-telegram-bot
New to this project? Check out the Quick Start Guide (QUICKSTART.md) to get running in 5 minutes!
π¨π³ Chinese Language Support: See CHINESE_SUPPORT.md for δΈζε½δ»€εεθ½
- Features
- Prerequisites
- Installation
- Configuration
- Running the Bot
- Available Commands
- Deployment
- Troubleshooting
- Multi-language Support: Chinese (δΈζ), English
- Weather information via OpenWeatherMap API
- Random meme generation
- Sentiment analysis with NLTK
- Bar notification system
- Random number generator
- Language Detection: Auto-detect text language (100+ languages)
- Translation: Translate between languages using Google Translate
- Webhook and polling modes
- Flask web server with health check endpoints
- Python 3.13 or higher (3.13-3.14)
- Telegram Bot Token (get from @BotFather)
- pip or Poetry for dependency management
- (Optional) Render.com account for deployment
# Clone the repository
git clone https://github.com/ruopsdev/tibo-telegram-bot.git
cd tibo-telegram-bot
# Create virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt# Clone the repository
git clone https://github.com/ruopsdev/tibo-telegram-bot.git
cd tibo-telegram-bot
# Install dependencies with Poetry
poetry install
poetry shellCreate a .env file in the project root or set these environment variables:
# Required - Get this from @BotFather on Telegram
export TIBO_TELEGRAM_BOT_TOKEN="your_telegram_bot_token_here"
# Optional - For Render.com deployment only
export RENDER_SERVICE_ID="your_render_service_id"
export RENDER_API_KEY="your_render_api_key"
# Optional - For TeleAds middleware (if using)
export TELEADS_API_KEY="your_teleads_api_key"
# Optional - Server port (default: 8443)
export PORT=8443- Open Telegram and search for @BotFather
- Send
/newbotcommand - Follow the instructions to create your bot
- Copy the token provided by BotFather
- Set it as
TIBO_TELEGRAM_BOT_TOKENenvironment variable
Polling mode is recommended for local development and testing:
# Set the IDE environment variable to enable polling mode
export IDE=1
export TIBO_TELEGRAM_BOT_TOKEN="your_token_here"
# Run the bot
python telegram.pyThe bot will start in polling mode and listen for messages directly from Telegram.
Webhook mode is used for production deployment on platforms like Render.com:
# Set environment variables
export TIBO_TELEGRAM_BOT_TOKEN="your_token_here"
export PORT=8443
# Run with Flask development server
python telegram.py
# OR run with Gunicorn (recommended for production)
gunicorn telegram:app --bind 0.0.0.0:8443python manage.py runserverπ For complete command reference with examples, see COMMANDS.md
Once the bot is running, you can use these commands in Telegram:
/start- Initialize the bot, register user, and show help/check- Same as/start- register and show welcome/help- Display list of available commands
/weather [city]- Get current weather (default city: Perm)- Example:
/weather Moscow
- Example:
/ΠΏΠΎΠ³ΠΎΠ΄Π° [Π³ΠΎΡΠΎΠ΄]- Weather command in Russian
/mem- Get a random meme from imgflip/meme- Get a random meme (same as/mem)/getimageor/image- Get a random image from imgflip/8,/eight,/Π²ΠΎΡΠ΅ΠΌΡ,/ΡΠ°Π½Π΄ΠΎΠΌ- Generate random number between 1-100/3.14,/3,/three,/ΡΡΠΈ,/pi,/ΠΏΠΈ- Display the value of Pi (3.141592...)
/bar- Notify bar members with:- Mention all configured bar members
- Create a poll "DRINK BEER SAVE WATER"
- Send random beer photo
All these commands trigger sentiment analysis - the bot will ask you to send text, then analyze its emotional tone and respond with an emoji and sentiment scores:
Main command:
/emotion- Analyze sentiment of your text
Alternative commands (all do the same):
/themes, /idea, /more, /mind, /context, /echo, /bet, /produce, /think, /note, /tibo, /agenda, /graph, /map, /push, /fact, /top, /stat, /game, /quiz, /test, /chat, /bio, /date, /rpg, /lol, /notify, /quote, /advice, /contact, /donate, /share, /random, /schedule, /settings, /new
Sentiment responses:
- π Very positive (>0.75)
- π Positive (>0.5)
- π Slightly positive (>0.25)
- π€¨ Neutral positive (>0)
- π₯ Neutral negative (>-0.25)
- π Negative (>-0.5)
- πΉ Very negative (>-0.75)
- π€¬ Extremely negative (>-1)
/promo- Display advertisement (requires TeleAds configuration)/help_auth- Show inline bot capabilities with contact button
-
Create account on Render.com
-
Create a new Web Service
-
Connect your GitHub repository
-
Configure the service:
- Build Command:
pip install -r requirements.txt - Start Command:
gunicorn telegram:app - Environment: Python 3.13
- Build Command:
-
Add Environment Variables:
TIBO_TELEGRAM_BOT_TOKENRENDER_SERVICE_ID(found in Render dashboard)RENDER_API_KEY(create in Render account settings)
-
Deploy the service
-
After deployment, visit
https://your-service-url.onrender.com/to set the webhook
Once deployed, these endpoints are available:
GET /- Set webhook to current URLPOST /<TIBO_TELEGRAM_BOT_TOKEN>- Telegram webhook endpointGET /health- Health check (returns "OK")GET /debug- Debug informationGET|POST /restart- Restart Render serviceGET /status- Check Render service status
- Check if
TIBO_TELEGRAM_BOT_TOKENis set correctly - Verify webhook is set (visit
/debugendpoint) - Check logs for error messages
- Ensure all required dependencies are installed
# Reinstall all dependencies
pip install -r requirements.txt --upgradeThe bot will automatically download NLTK data on first run. If you encounter errors:
python -c "import nltk; nltk.download('vader_lexicon')"If webhook isn't working:
# Remove existing webhook
curl https://api.telegram.org/bot<YOUR_TOKEN>/deleteWebhook
# Set new webhook
curl https://api.telegram.org/bot<YOUR_TOKEN>/setWebhook?url=https://your-domain.com/<YOUR_TOKEN># Change the port
export PORT=8000
python telegram.pytibo-telegram-bot/
βββ telegram.py # Main bot application
βββ manage.py # Flask-Script management
βββ tiz.py # NLTK sentiment analysis examples
βββ requirements.txt # Python dependencies
βββ pyproject.toml # Poetry configuration
βββ Procfile # Render/Heroku deployment config
βββ README.md # This file
βββ .gitignore # Git ignore rules
- Never commit your
.envfile or exposeTIBO_TELEGRAM_BOT_TOKEN - Keep your dependencies up to date
- Review the security audit in project issues before deploying
Git-Flow ΠΌΠ΅ΡΠΎΠ΄ΠΎΠ»ΠΎΠ³ΠΈΡ ΠΌΠ΅ΡΡΠΎΠ»ΠΎΠ³ΠΈΠΈ Π·Π°ΠΏΡΡΠΊΠ° ΡΠΈΡΠ΅Π²Π΅ΡΠΎΠΊ Π² ΠΊΠ»Π°ΡΡΠ΅ΡΠ΅ Kubernetes: https://medium.com/ruopsdev/git-flow-presentation-b80643390888?source=collection_home_page----925f883655a3-----0-----------------------------------
-
https://medium.com/ruopsdev/git-flow-presentation-b80643390888?source=collection_home_page----925f883655a3-----0----------------------------------- - ΠΡΠ΅Π·Π΅Π½ΡΠ°ΡΠΈΡ ΠΌΠ΅ΡΠΎΠ΄ΠΎΠ»ΠΎΠ³ΠΈΠΈ git-flow - ΠΡΠ΅Π·Π΅Π½ΡΠ°ΡΠΈΡ ΠΌΠ΅ΡΠΎΠ΄ΠΎΠ»ΠΎΠ³ΠΈΠΈ git-flow
-
https://medium.com/ruopsdev/git-flow-presentation-b80643390888?source=collection_home_page----925f883655a3-----0----------------------------------- - ΠΏΠ΅ΡΠ΅Π²ΠΎΠ΄ ΡΠ΅ΡΠ΅Π· ΡΠ°ΠΉΡ https://translate.google.com
-
ΠΠ²ΡΠΎΡ (Author): Sergei Chudakov - ΠΠ²ΡΠΎΡ ΠΊΠ½ΠΈΠ³ΠΈ Dive into Penguin Π‘Π΅ΡΠ³Π΅ΠΉ Π§ΡΠ΄Π°ΠΊΠΎΠ² - ΠΠΎΠ³ΡΡΠΆΠ΅Π½ΠΈΠ΅ Π² ΠΠΈΠ½Π³Π²ΠΈΠ½Π° - ΠΠ½ΠΈΠ³Π° ΠΏΡΠΎ ΡΠ°Π±ΠΎΡΡ Π² ΠΊΠΎΠ½ΡΠΎΠ»ΠΈ Linux Π΄Π»Ρ Π½Π°ΡΠΈΠ½Π°ΡΡΠΈΡ ΠΈΠ·ΡΡΠ°ΡΡ WSL, Zsh ΠΈ Bash Π½Π° ΡΡΡΡΠΊΠΎΠΌ: https://github.com/meteoritt/gentleman/blob/master/README.ru-RU.md - ΠΠ»Ρ Π½Π°Π²ΠΈΠ³Π°ΡΠΈΠΈ Π² ΠΊΠΎΠ½ΡΠΎΠ»ΠΈ ΠΎΡΡΠ°Π²ΡΡΠ΅ ΠΏΠ°Π»ΡΡΠΈΠΊΠ°ΠΌΠΈ Ctrl + <- (Arrow Left), Ctrl + -> (Arrow Right), Shift + Arrow - Marker, Copy, Paste. Right Click Mouse, Middle Button Click. Double Click Left Button Mouse. USB-D.
-
Tables 1 (Π’Π°Π±Π»ΠΈΡΠ° One):
-
Ctrl+C β ΠΊΠΎΠΏΠΈΡΠΎΠ²Π°Π½ΠΈΠ΅ (copy)
-
Win+V β ΠΌΠ΅Π½Π΅Π΄ΠΆΠ΅Ρ Π±ΡΡΠ΅ΡΠ° ΠΎΠ±ΠΌΠ΅Π½Π°
-
Win+L β Π±Π»ΠΎΠΊΠΈΡΠΎΠ²ΠΊΠ° ΡΠΊΡΠ°Π½Π° (lock)
-
Ctrl+Shift+Esc β Π΄ΠΈΡΠΏΠ΅ΡΡΠ΅Ρ Π·Π°Π΄Π°Ρ (process explorer)
-
PrtScr β ΡΠ½ΠΈΠΌΠΎΠΊ ΡΠΊΡΠ°Π½Π° Π² Π±ΡΡΠ΅Ρ ΠΎΠ±ΠΌΠ΅Π½Π° (Print Screen)
-
Alt+Shift+S β ΡΠ½ΠΈΠΌΠΎΠΊ ΡΠΊΡΠ°Π½Π° Π½ΠΎΠΆΠ½ΠΈΡΠ°ΠΌΠΈ (save screen)
-
Alt+PrtScr β ΡΠ½ΠΈΠΌΠΎΠΊ ΡΠΊΡΠ°Π½Π° ΠΈΠ»ΠΈ ΠΎΠΊΠ½Π° Π² OneDrive
-
Alt+Tab β ΠΏΠ΅ΡΠ΅ΠΊΠ»ΡΡΠ΅Π½ΠΈΠ΅ ΠΎΠΊΠΎΠ½ (Tabula)
-
Win+Tab β ΠΏΠ΅ΡΠ΅ΠΊΠ»ΡΡΠ΅Π½ΠΈΠ΅ ΡΠ°Π±ΠΎΡΠΈΡ ΡΡΠΎΠ»ΠΎΠ²
-
Win+Arrow (ΡΡΡΠ΅Π»ΠΊΠ°) β ΡΠ°ΠΉΠ»ΠΎΠ²ΡΠΉ ΠΌΠ΅Π½Π΅Π΄ΠΆΠ΅Ρ ΠΎΠΊΠΎΠ½, ΠΏΡΠΈΠ»Π΅ΠΏΠ»ΡΠ΅Ρ ΠΎΠΊΠ½ΠΎ Π² Π³ΡΠ°Π½ΠΈΡΠ°ΠΌ ΡΠΊΡΠ°Π½Π°
-
Win+R β ΠΎΠΊΠ½ΠΎ Π²ΡΠΏΠΎΠ»Π½ΠΈΡΡ (Run)
ScrLk ΠΊΠ»Π°Π²ΠΈΡΠ° ΡΡΠ΄ΠΎΠΌ Ρ PrtScr Π²ΠΊΠ»ΡΡΠ°Π΅Ρ ΠΈ ΠΎΡΠΊΠ»ΡΡΠ°Π΅Ρ Π½Π°Π²ΠΈΠ³Π°ΡΠΈΡ Π² Microsoft Excel ΠΏΠΎ ΡΡΠ΅ΠΉΠΊΠ°ΠΌ Π² ΡΠ°Π±Π»ΠΈΡΠ΅ ΡΡΡΠ΅Π»ΠΊΠ°ΠΌΠΈ, ΠΌΠΎΠΆΠ½ΠΎ Π»ΠΈΡΡΠ°ΡΡ Π΄ΠΎΠΊΡΠΌΠ΅Π½Ρ ΠΈΠ»ΠΈ ΠΏΠ΅ΡΠ΅Ρ ΠΎΠ΄ΠΈΡΡ ΠΏΠΎ ΡΡΠ΅ΠΉΠΊΠ°ΠΌ, Π² Π·Π°Π²ΠΈΡΠΈΠΌΠΎΡΡΠΈ ΠΎΡ ΡΠΎΠ³ΠΎ Π±ΡΠ» Π²ΠΊΠ»ΡΡΠ΅Π½ ScrLk ΠΈΠ»ΠΈ Π½Π΅Ρ. Scroll Lock.
Π Linux ΠΏΠΎΠ»Π΅Π·Π½Π° ΡΡΠΈΠ»ΠΈΡΠ° screen, tmux ΠΈΠ»ΠΈ byobu Π΄Π»Ρ Π²ΡΠΏΠΎΠ»Π½Π΅Π½ΠΈΡ Π΄ΠΎΠ»Π³ΠΈΡ Π·Π°ΠΏΡΠΎΡΠΎΠ², ΠΊΠΎΠΌΠ°Π½Π΄ ΠΈΠ»ΠΈ Π±ΡΠΊΠ°ΠΏΠΎΠ². Π£ΡΡΠ°Π½ΠΎΠ²ΠΊΠ° sudo apt install screen -y # (C) CSRedRat Β© 2026 β ΡΠΈΠΌΠ²ΠΎΠ» ΠΊΠΎΠΏΠΈΡΠ°ΠΉΡΠ°, Π·Π½Π°ΠΊ Π°Π²ΡΠΎΡΡΠΊΠΎΠ³ΠΎ ΠΏΡΠ°Π²Π°, ΠΏΡΠ΅Π΄ΡΡΠ°Π²Π»ΡΠ΅Ρ ΡΠΎΠ±ΠΎΠΉ Π»Π°ΡΠΈΠ½ΡΠΊΡΡ Π±ΡΠΊΠ²Ρ C (ΠΏΠ΅ΡΠ²Π°Ρ Π±ΡΠΊΠ²Π° ΡΠ»ΠΎΠ²Π° Β«copyrightΒ») Π² ΠΎΠΊΡΡΠΆΠ½ΠΎΡΡΠΈ. Site: https://yandex.ru/search/?text=copyright+symbol&lr=2&clid=1836588, may be later && may be before: https://web.archive.org/web/20200105175935/http://metin2wiki.ru/wiki/FAQ_Linux#expand
-
Ctrl+C β ΠΎΡΡΠ°Π½ΠΎΠ²ΠΈΡΡ Π²ΡΠΏΠΎΠ»Π½Π΅Π½ΠΈΠ΅ ΠΊΠΎΠΌΠ°Π½Π΄Ρ
-
Ctrl+X β ΠΎΡΡΠ°Π½ΠΎΠ²ΠΈΡΡ Π²ΡΠΏΠΎΠ»Π½Π΅Π½ΠΈΠ΅ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΡ
-
Ctrl+Z β ΡΠ±ΡΠ°ΡΡ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΡ Π² ΡΠΎΠ½ΠΎΠ²ΡΠΉ ΡΠ΅ΠΆΠΌ
-
Ctrl+R β ΡΠ΅ΠΊΡΡΡΠΈΠ²Π½ΡΠΉ ΠΏΠΎΠΈΡΠΊ ΠΏΠΎ ΠΈΡΡΠΎΡΠΈΠΈ ΠΊΠΎΠΌΠ°Π½Π΄
-
Ctrl+F β forward, ΠΎΠ±ΡΠ°ΡΠ½ΡΠΉ ΠΏΠΎΠΈΡΠΊ ΠΏΠΎ ΠΊΠΎΠΌΠ°Π½Π΄Π°ΠΌ
ΠΠΎΠΌΠ°Π½Π΄Π° htop ΠΏΠΎΠΊΠ°Π·ΡΠ²Π°Π΅Ρ Π½Π°Π³ΡΡΠ·ΠΊΡ ΠΏΠΎ ΠΊΠΎΠΌΠΏΡΡΡΠ΅ΡΡ, ΡΡΡΠ°Π½ΠΎΠ²ΠΊΠ° sudo apt install htop -y
ΠΠΎΠΌΠ°Π½Π΄Π° sudo locate <ΡΠ΅ΠΊΡΡ> ΠΈΡΠ΅Ρ ΠΏΠΎ Π²ΡΠ΅ΠΌΡ ΡΠ΅ΡΠ²Π΅ΡΡ, ΠΏΠ΅ΡΠ΅Π΄ ΡΡΠΈΠΌ Π½Π°Π΄ΠΎ Π²ΡΠΏΠΎΠ»Π½ΠΈΡΡ ΠΊΠΎΠΌΠ°Π½Π΄Ρ sudo apt install mlocate -y && sudo updatedb
ΠΠΎΠΉ ΡΠ΅Π»Π΅Π³ΡΠ°ΠΌ: https://t.me/ChudakovSergey ΠΈΠ»ΠΈ @ChudakovSergey ΠΈΠ»ΠΈ ΠΌΠΎΠΆΠ½ΠΎ Π½Π°ΠΉΡΠΈ ΠΏΠΎ Π½ΠΎΠΌΠ΅ΡΡ ΡΠ΅Π»Π΅ΡΠΎΠ½Π° +79638610401
ΠΠΈΡΠ½Π°Ρ ΠΏΠΎΡΡΠ°: csredrat@gmail.com
Sign (ΠΠΎΠ΄ΠΏΠΈΡΡ): ΡΡΠ΅ΡΡ ΠΎΠ² δ½ ζθͺͺδΈζεοΌ- Π½ΠΈ Ρ ΡΡ ΡΡΠ° ΡΠΎΠ½Π³Π²ΠΈΠ½ ΠΌΠ° https://burui.t.me (sj588 εΈη)
ALERT: ΠΡΡ ΠΊΠΎΠ»Π»Π΅Π³ Π΄Π»Ρ ΡΡΠ°ΡΡΠ°ΠΏΠ° ΠΏΠΎ Π½Π°ΠΏΠΈΡΠ°Π½ΠΈΡ ΠΊΠΎΠ΄Π° ΠΏΠ»Π°ΡΡΠΎΡΠΌΡ Joker (codename RED.L), ΠΎΡΠ½ΠΎΠ²Π°Π½Π½ΠΎΠΉ Π½Π° Topalias: https://github.com/ruopsdev/topalias
Π― Π°Π²ΡΠΎΡ ΠΊΠ½ΠΈΠ³ΠΈ ΠΏΡΠΎ Linux: https://github.com/meteoritt/gentleman (Π΅ΡΠ»ΠΈ Π½Π°Π΄ΠΎ Π½Π°ΡΡΡΠΎΠΈΡΡ Π΄ΠΎΠΌΠ°ΡΠ½ΠΈΠΉ ΠΊΠΎΠΌΠΏΡΡΡΠ΅Ρ Π½Π° Windows Ρ WSL β Windows Subsystem Linux ΠΏΠΎΠ΄ Π²ΡΠΏΠΎΠ»Π½Π΅Π½ΠΈΠ΅ ΠΏΠ΅Ρ-ΠΏΡΠΎΠ΄ΠΆΠ΅ΠΊΡΠΎΠ², Ρ ΠΎΠ±Π±ΠΈ, ΠΏΡΠΎΠ΅ΠΊΡΠΎΠ²)
curl -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py
python3 -m ensurepip --upgrade
python3 -m pip --upgrade pip
pip3 install poetry
python3 -m pip install poetry
python3 -m poetry install
NoBSD: https://github.com/ruopsdev/tibo-telegram-bot/wiki/NoBSD-License
NoBSD License: https://github.com/ruopsdev/tibo-telegram-bot/wiki/NoBSD-License