项目作者: dmromanov

项目描述 :
[WIP] Events Arranger & Tracker Bot for Telegram
高级语言: PHP
项目地址: git://github.com/dmromanov/telegram-eant-bot.git
创建时间: 2018-03-30T16:30:36Z
项目社区:https://github.com/dmromanov/telegram-eant-bot

开源协议:GNU Affero General Public License v3.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

  1. 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:

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

Unregister the bot:

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

Send a message to all chats:

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

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

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

Authors