Skip to content

Telegram bot to send alerts and a UPI QR to frens to remind and collect my YT Family Sub payment 🫒

Notifications You must be signed in to change notification settings

kausmeows/payme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Payme

A Python-based Telegram bot that sends automated reminders in telegram to friends on the 23rd of every month at 9 AM to remind them of paying for that one family subscription service we purchased as a group. The bot uses apscheduler for scheduling

payme-walle

Features

  • Sends scheduled reminders with a QR code attachment.
  • Dynamically loads recipients from a JSON file.
  • Configurable scheduling using apscheduler.
  • Logging with color-coded outputs for better readability.

Project Structure

telegram-payment-bot/
β”œβ”€β”€ bot/
β”‚   β”œβ”€β”€ __init__.py              # Marks the directory as a Python package
β”‚   β”œβ”€β”€ main.py                  # Main entry point for the bot
β”‚   β”œβ”€β”€ scheduler.py             # Scheduler logic for reminders
β”‚   β”œβ”€β”€ utils.py                 # Helper functions (e.g., loading recipients)
β”‚   β”œβ”€β”€ logger.py                # Logging configuration
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ payment_qr.png           # QR code image to attach to reminders
β”‚   β”œβ”€β”€ receivers.json           # JSON file containing recipient data
β”‚   β”œβ”€β”€ receivers.example.json   # Example JSON file 
β”œβ”€β”€ tests/
β”‚   β”œβ”€β”€ test_scheduler.py        # Tests for scheduling logic
β”œβ”€β”€ .env                         # Environment variables file
β”œβ”€β”€ .gitignore                   # Ignored files and directories
β”œβ”€β”€ requirements.txt             # Python dependencies
β”œβ”€β”€ README.md                    # Documentation file

Getting Started

1. Prerequisites

Python 3.8 or higher Telegram bot token (create a bot via BotFather)

2. Installation

a. Clone the repository:

git clone https://github.com/your-username/telegram-reminder-bot.git
cd telegram-reminder-bot

b. Create a Python virtual environment:

python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

c. Install dependencies:

pip install -r requirements.txt

d. Set up the .env file: Create a .env file in the root directory and add:

TELEGRAM_TOKEN=<YOUR_TELEGRAM_BOT_TOKEN>

e. Update recipients.json: Add recipient chat IDs in data/recipients.json:

{
    "@username1": "123456789",
    "@username2": "987654321"
}

3. Usage

Start the bot:

python -m bot.main

4. Demo

payme-example

Default Behavior:

The bot will send reminders to all recipients on the 23rd of every month at 9 AM. The reminder includes a predefined message and the attached QR code.

About

Telegram bot to send alerts and a UPI QR to frens to remind and collect my YT Family Sub payment 🫒

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages