Get your Telegram bot running in 5 minutes!
- Open Telegram and find @BotFather
- Send:
/newbot - Choose a name (e.g., "My Albert Bot")
- Choose a username (must end in 'bot', e.g., "my_albert_bot")
- Copy the token that BotFather gives you (looks like:
123456789:ABCdefGHIjklMNOpqrsTUVwxyz)
# Make sure you have Python 3.13+
python3 --version
# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt# Copy the example environment file
cp .env.example .env
# Edit .env and add your bot token
nano .env # or use any text editorIn the .env file, replace your_telegram_bot_token_here with your actual token from BotFather.
# Set environment to use polling mode (for local testing)
export IDE=1
# Load environment variables
export $(cat .env | xargs)
# Run the bot
python telegram.pyYou should see:
Bot initialized with token: 123456789:...
- Open Telegram
- Find your bot by the username you created
- Send
/startto your bot - Try other commands like
/help,/weather,/meme
pip install -r requirements.txt --upgrade- Check that your token in
.envis correct - Make sure there are no extra spaces
- Verify
IDE=1is set (for polling mode) - Check that
TIBO_TELEGRAM_BOT_TOKENis loaded:echo $TIBO_TELEGRAM_BOT_TOKEN - Look for error messages in the terminal
- Read the full README.md for deployment options
- Customize the bot commands in
telegram.py - Deploy to Render.com for 24/7 operation
Once running, try these in Telegram:
/start- Initialize bot and get welcome/help- See all commands
/weather Moscow- Get weather for Moscow/погода Москва- Weather in Russian/meme- Get a random meme/8- Random number (1-100)/pi- Display value of Pi/emotion- Analyze sentiment (bot will ask for text)
/bar- Notify bar members with poll
These all trigger sentiment analysis (same feature):
/emotion, /themes, /idea, /mind, /tibo, and 30+ more aliases
Example:
- Send
/emotion - Bot replies: "Send your text"
- Send: "I love this bot!"
- Bot analyzes and responds: "😁 {'neg': 0.0, 'neu': 0.192, 'pos': 0.808, 'compound': 0.6369}"
Happy botting! 🤖