Telegram bot for prayer times based on user location.
Prayer time data source: Aladhan Prayer Times API.
- Dependency set updated for modern Python and current Telegram API wrapper.
urllib3explicitly pinned to>=2.6.3to address current GHSA advisories.- Configuration supports
.env(with backward compatibility for legacyconfig.py). - Safer API handling: request timeout, status checks, and clear failure responses.
- Time parsing and current-prayer calculation simplified and made deterministic.
- Removed duplicate/unsafe logic and improved logging.
- Added in-bot
/settingswith language switch (UZ,TR,RU,EN) and Asr mode switch:Early Asr (Standard)->school=0Delayed Asr (Hanafi)->school=1
- Python 3.10+
- Install dependencies:
pip install -r requirements.txt- Create environment file:
cp .env.example .env- Fill
.envvalues:
NAMOZ_BOT_TOKEN: Telegram token from@BotFatherNAMOZ_ADMIN_ID: your Telegram chat id (optional,0disables forwarding)
- Run:
python3 namozimbot.pyIf you already use a config.py with namozbottoken, namozapibase, namozadmin, it still works.
MIT. See LICENSE.