FromSubsBot is a Telegram bot for moderation and delayed publication of user content in a Telegram channel. Suitable for publics where subscribers can send their thoughts or suggestions, and moderators can approve and publish them manually or on a schedule.
- Receiving texts from subscribers.
- Transferring for moderation with the "Accept" / "Reject" buttons.
- Request for publication immediately or by date.
- Flexible parsing of the publication date.
- Secure storage of tokens and configuration via
.env.
- Clone the repository:
git clone https://github.com/gordon0056/fromsubsbot.git cd fromsubsbot - Install dependencies:
pip install -r requirements.txt
- Create a .env file:
API_TOKEN=your_bot_token MODERATOR_CHAT_ID=your_moderator_chat_id CHANNEL_ID=@your_channel_name
- Run the bot:
python main.py
🛠 Configuration All configuration is stored centrally in the config.py file, which uses pydantic and dotenv. ```python
from config import settings
print(settings.API_TOKEN)
🔐 Security All keys and tokens are moved to .env.
The .env file is added to .gitignore and should not be included in the public repository.