Skip to content

tixuz/namozimbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Namoz IM Bot

Telegram bot for prayer times based on user location.

Prayer time data source: Aladhan Prayer Times API.

What was modernized

  • Dependency set updated for modern Python and current Telegram API wrapper.
  • urllib3 explicitly pinned to >=2.6.3 to address current GHSA advisories.
  • Configuration supports .env (with backward compatibility for legacy config.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 /settings with language switch (UZ, TR, RU, EN) and Asr mode switch:
    • Early Asr (Standard) -> school=0
    • Delayed Asr (Hanafi) -> school=1

Requirements

  • Python 3.10+

Setup

  1. Install dependencies:
pip install -r requirements.txt
  1. Create environment file:
cp .env.example .env
  1. Fill .env values:
  • NAMOZ_BOT_TOKEN: Telegram token from @BotFather
  • NAMOZ_ADMIN_ID: your Telegram chat id (optional, 0 disables forwarding)
  1. Run:
python3 namozimbot.py

Legacy config support

If you already use a config.py with namozbottoken, namozapibase, namozadmin, it still works.

License

MIT. See LICENSE.

About

Rebuilt my old Namoz Telegram bot from scratch: modern deps, security fixes, multilingual UI (UZ/TR/RU/EN), user settings (Asr method), safer API handling, and cleaner UX. Open-source + live again 🚀

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages