nambilisamuel/namibia-telegram-bot
0
Namibia Telegram Bot
A proactive Telegram bot for engaging conversations about Namibia in group chats.
Features
- Proactive group chatting
- Greeting responses
- Conversation initiation
- Interactive prompts
- New member engagement
- Scheduled messages
- Engagement statistics
Setup
Environment Variables (Required)
Set these in Hugging Face Spaces Secrets:
TELEGRAM_BOT_TOKEN: Your bot token from @BotFatherADMIN_IDS: Comma-separated Telegram user IDsGROUP_ID: Your Telegram group ID (must be negative)
Google Sheets Integration
The bot uses a Google Sheet for Q&A knowledge base. Make sure your sheet is publicly accessible.
Usage
In your Telegram group:
- Say "hi" or "hello" - the bot will respond
- Mention "Namibia" in any message
- Ask travel questions
- Use /engage to encourage chatting
- Use /stats to see engagement statistics (admins only)
Technical Details
Built with:
- python-telegram-bot
- Flask web server
- Pandas for data handling
- RapidFuzz for text matching
The bot runs continuously on Hugging Face Spaces and maintains a web interface for monitoring.
Deployment
This bot is deployed on Hugging Face Spaces and runs as a Docker container with:
- Flask web server on port 7860
- Telegram bot polling in background thread
- Scheduled jobs for regular engagement
License
MIT License
