A specialized IRC bot designed to monitor crypto-related news from IRC channels and forward them to Telegram. The bot features intelligent message filtering, duplicate detection, and periodic news digests.
- Real-time News Monitoring: Connects to IRC channels and monitors messages in real-time
- Crypto Keywords Detection: Filters messages based on an extensive list of crypto-related keywords
- Telegram Integration: Forwards relevant news directly to a specified Telegram channel
- Duplicate Prevention: Implements smart caching to prevent duplicate news from being shared
- Periodic Digests: Generates comprehensive news digests every 6 hours, including:
- Total number of news items
- Top trending keywords
- Complete list of news during the period
- Python 3.12
- IRC Bot Framework
- Telegram Bot API
- Docker support
- Pipenv for dependency management
The bot is configured using environment variables:
- IRC server and channel settings
- Telegram bot token and chat ID
- Optional OpenAI API key for AI-powered summaries
- Clone the repository
- Copy
.env.example
to.env
and fill in your configuration - Install dependencies:
pipenv install
src/
├── bot/
│ ├── irc_bot.py # Main IRC bot implementation
│ └── message_handler.py # Message processing and keyword detection
├── config/
│ ├── keywords.py # List of crypto-related keywords
│ └── settings.py # Environment and configuration settings
└── services/
├── telegram.py # Telegram messaging service
├── news_cache.py # Duplicate detection service
├── digest_service.py # Periodic news digest generation
└── ai_summary_service.py # OpenAI-powered news summarization
# Root level files
├── main.py # Application entry point
├── Dockerfile # Docker configuration
├── docker-compose.yml # Docker Compose configuration
├── Pipfile # Python dependencies
├── Pipfile.lock # Locked dependencies
├── .env # Environment variables (not in git)
├── .env.example # Example environment variables
├── .gitignore # Git ignore rules
└── README.md # Project documentation
- Docker Desktop installed and running
- Docker Compose installed
- Build and start the container:
docker-compose up
- Stop the container:
docker-compose down
- Rebuild the container after changes:
docker-compose up --build
- View container logs:
docker-compose logs
- Access container shell:
docker-compose exec irc-bot bash
- If you encounter credential issues, try:
docker login
- To reset Docker configuration:
docker-compose down -v
Dockerfile
: Contains the container configurationdocker-compose.yml
: Defines the services, networks, and volumes
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Copyright (C) 2024 GaloisField