2025-08-30 15:35:32 +02:00
2025-08-27 11:59:26 +01:00
2025-08-27 08:52:36 +00:00
2025-08-27 11:55:53 +01:00

Telegram Bot Message Processor

This repository provides a simple PHP + Makefile setup to fetch Telegram updates and process incoming messages.

Overview

  • process_message.php defines the function process_message() where you can add your own logic for handling incoming messages (sending replies, saving data, etc.).
  • Makefile automates fetching updates, processing them, and cleaning data files.
  • lib/main.php expected to contain helper functions like telegram_send_text() and telegram_send_file().

How It Works

  1. Fetch updates : calls the Telegram Bot API (getUpdates) and stores raw JSON messages in data/*.update_id.json.
make fetch_updates
  1. Process updates : each update is passed to process_message.php, where you can customize your bots behavior.
make process_updates
  1. Clean data : removes all program generated files
make clean

Requirements:

  • PHP CLI
  • jq (for parsing JSON in make fetch_updates)
  • curl
Description
No description provided
Readme 39 KiB
Languages
PHP 82.2%
Makefile 17.8%