orenlab / pytmbot

Flexible Telegram bot designed to manage Docker containers, monitor server status, and extend its functionality through a plugin system
https://orenlab.github.io/pytmbot/
MIT License
7 stars 2 forks source link

User IDS not found in .env #21

Closed AsdertyTreds closed 4 months ago

AsdertyTreds commented 4 months ago

in the setup it asks for an USER ID, but it is not registered in the env

AsdertyTreds commented 4 months ago

why is he not in env, but in app/core/settings/bot_settings.py

orenlab commented 4 months ago

@AsdertyTreds , i assume that the process of working with a class is more efficient - we load it into memory only once and work within the context of the entire application. On the other hand, for .env, we will need to read the user_id each time.

Also, in my opinion, .envy is meant for truly sensitive information - in our case, tokens (for which we use Pydantic for secure reading), the user_id is not such sensitive data.

orenlab commented 4 months ago

I plan to update the documentation to clearly explain what and where the bot's configuration script create, and where each setting is stored.

AsdertyTreds commented 4 months ago

I agree if it's a single user bot