/telegram-eant-bot

[WIP] Events Arranger & Tracker Bot for Telegram

Primary LanguagePHPGNU Affero General Public License v3.0AGPL-3.0

Events Arranger and Tracker Bot

Build Status GitHub license codecov

Add me to your Telegram: https://t.me/eant_bot

Installation

Clone this repository and run

composer install

Configuration

Setup the following environment variables:

  • TELEGRAM_APIKEY
  • DATABASE_URL, e.g. mysql://<login>:<password>@<host>/<database>

Read and edit config/app.php and setup the 'Datasources' and any other configuration relevant for your application.

CLI Commands

Register the bot in Telegram:

$ TELEGRAM_APIKEY=<api-key> ./bin/cake setup webhook_register <domain> <ssl-certificate> <max-requests>

Unregister the bot:

$ TELEGRAM_APIKEY=<api-key> ./bin/cake setup webhook_unregister

Send a message to all chats:

$ TELEGRAM_APIKEY=<api-key> DATABASE_URL=<database-url> ./bin/cake multicast_message "<message>"

Clean a database (when switching between different bots accounts):

$ TELEGRAM_APIKEY=<api-key> DATABASE_URL=<database-url> ./bin/cake setup clean_db

Authors