A powerful Telegram bot that allows users to post content directly to Reddit, supporting multiple media types and subreddit-specific features.
git clone https://github.com/viperadnan-git/reddit-telegram-bot.git
cd reddit-telegram-bot
pip install -r requirements.txt
.env file in the root directory with the following variables:TELEGRAM_BOT_TOKEN=your_telegram_bot_token
REDDIT_CLIENT_ID=your_reddit_client_id
REDDIT_CLIENT_SECRET=your_reddit_client_secret
MONGO_URI=your_mongodb_connection_string
TEMP_DIR=tmp # Optional, defaults to 'tmp'
/newbotpython -m src
In Telegram, start a conversation with your bot
Available commands:
/start - Initialize the bot/login - Authenticate with RedditThe project follows a modular architecture:
src/
āāā __init__.py # Logger configuration
āāā __main__.py # Application entry point
āāā config.py # Environment configuration
āāā constant.py # Conversation states
āāā database.py # MongoDB interface
āāā enums.py # Media type enums
āāā handlers/ # Command handlers
ā āāā login.py # Authentication handlers
ā āāā post.py # Posting handlers
āāā models/ # Data models
ā āāā reddit_post.py # Post structure
āāā modules/ # Core functionality
ā āāā bot_context.py # Bot context
ā āāā decorators.py # Auth decorators
ā āāā reddit_manager.py # Reddit API wrapper
āāā utils.py # Helper functions
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSEā file for details.
If you encounter any issues or have questions, please open an issueā .
Content type
Image
Digest
sha256:12f4b07b4ā¦
Size
57.5 MB
Last updated
over 1 year ago
docker pull viperadnan/reddit-telegram-bot