Some readme cleanup, while a big chunk of the documentation is still here.

parent 683aa1ad
<img src="assets/logo/512px/logo_plain.png" title="PHP Telegram Bot" alt="PHP Telegram Bot logo">
# PHP Telegram Bot # PHP Telegram Bot
A Telegram Bot based on the official [Telegram Bot API][Telegram-Bot-API]
[![Join the bot support group on Telegram](https://img.shields.io/badge/telegram-@PHP__Telegram__Bot__Support-32a2da.svg)](https://telegram.me/PHP_Telegram_Bot_Support) [![Join the bot support group on Telegram](https://img.shields.io/badge/telegram-@PHP__Telegram__Bot__Support-32a2da.svg)](https://telegram.me/PHP_Telegram_Bot_Support)
[![Donate](https://img.shields.io/badge/%F0%9F%92%99-Donate-blue.svg)](#donate) [![Donate](https://img.shields.io/badge/%F0%9F%92%99-Donate-blue.svg)](#donate)
[![Build Status](https://travis-ci.org/php-telegram-bot/core.svg?branch=master)](https://travis-ci.org/php-telegram-bot/core) [![Build Status](https://travis-ci.org/php-telegram-bot/core.svg?branch=master)](https://travis-ci.org/php-telegram-bot/core)
[![Dependencies](https://tidelift.com/badges/github/php-telegram-bot/core)][Tidelift] [![Dependencies](https://tidelift.com/badges/github/php-telegram-bot/core)][Tidelift]
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/php-telegram-bot/core/develop.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-telegram-bot/core/?b=develop) [![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/php-telegram-bot/core/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-telegram-bot/core/?b=master)
[![Code Quality](https://img.shields.io/scrutinizer/g/php-telegram-bot/core/develop.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-telegram-bot/core/?b=develop) [![Code Quality](https://img.shields.io/scrutinizer/g/php-telegram-bot/core/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-telegram-bot/core/?b=master)
[![Latest Stable Version](https://img.shields.io/packagist/v/Longman/telegram-bot.svg)](https://packagist.org/packages/longman/telegram-bot) [![Latest Stable Version](https://img.shields.io/packagist/v/longman/telegram-bot.svg)](https://packagist.org/packages/longman/telegram-bot)
[![Total Downloads](https://img.shields.io/packagist/dt/Longman/telegram-bot.svg)](https://packagist.org/packages/longman/telegram-bot) [![Total Downloads](https://img.shields.io/packagist/dt/longman/telegram-bot.svg)](https://packagist.org/packages/longman/telegram-bot)
[![Downloads Month](https://img.shields.io/packagist/dm/Longman/telegram-bot.svg)](https://packagist.org/packages/longman/telegram-bot) [![Downloads Month](https://img.shields.io/packagist/dm/longman/telegram-bot.svg)](https://packagist.org/packages/longman/telegram-bot)
[![Minimum PHP Version](http://img.shields.io/badge/php-%3E%3D5.6-8892BF.svg)](https://php.net/) [![Minimum PHP Version](http://img.shields.io/badge/php-%3E%3D5.6-8892BF.svg)](https://php.net/)
[![License](https://img.shields.io/packagist/l/longman/telegram-bot.svg)](https://github.com/php-telegram-bot/core/LICENSE) [![License](https://img.shields.io/packagist/l/longman/telegram-bot.svg)](https://github.com/php-telegram-bot/core/LICENSE)
...@@ -23,10 +27,11 @@ A Telegram Bot based on the official [Telegram Bot API][Telegram-Bot-API] ...@@ -23,10 +27,11 @@ A Telegram Bot based on the official [Telegram Bot API][Telegram-Bot-API]
- [Create your first bot](#create-your-first-bot) - [Create your first bot](#create-your-first-bot)
- [Require this package with Composer](#require-this-package-with-composer) - [Require this package with Composer](#require-this-package-with-composer)
- [Choose how to retrieve Telegram updates](#choose-how-to-retrieve-telegram-updates) - [Choose how to retrieve Telegram updates](#choose-how-to-retrieve-telegram-updates)
- [Webhook installation](#webhook-installation) - [Webhook installation](#webhook-installation)
- [Self Signed Certificate](#self-signed-certificate) - [Self Signed Certificate](#self-signed-certificate)
- [Unset Webhook](#unset-webhook) - [Unset Webhook](#unset-webhook)
- [getUpdates installation](#getupdates-installation) - [getUpdates installation](#getupdates-installation)
- [getUpdates without database](#getupdates-without-database)
- [Support](#support) - [Support](#support)
- [Types](#types) - [Types](#types)
- [Inline Query](#inline-query) - [Inline Query](#inline-query)
...@@ -39,14 +44,15 @@ A Telegram Bot based on the official [Telegram Bot API][Telegram-Bot-API] ...@@ -39,14 +44,15 @@ A Telegram Bot based on the official [Telegram Bot API][Telegram-Bot-API]
- [Send message to all active chats](#send-message-to-all-active-chats) - [Send message to all active chats](#send-message-to-all-active-chats)
- [Utils](#utils) - [Utils](#utils)
- [MySQL storage (Recommended)](#mysql-storage-recommended) - [MySQL storage (Recommended)](#mysql-storage-recommended)
- [External Database connection](#external-database-connection)
- [Channels Support](#channels-support) - [Channels Support](#channels-support)
- [Commands](#commands) - [Commands](#commands)
- [Predefined Commands](#predefined-commands) - [Predefined Commands](#predefined-commands)
- [Custom Commands](#custom-commands) - [Custom Commands](#custom-commands)
- [Commands Configuration](#commands-configuration) - [Commands Configuration](#commands-configuration)
- [Admin Commands](#admin-commands) - [Admin Commands](#admin-commands)
- [Set Admins](#set-admins) - [Set Admins](#set-admins)
- [Channel Administration](#channel-administration) - [Channel Administration](#channel-administration)
- [Upload and Download directory path](#upload-and-download-directory-path) - [Upload and Download directory path](#upload-and-download-directory-path)
- [Logging](doc/01-utils.md) - [Logging](doc/01-utils.md)
- [Documentation](#documentation) - [Documentation](#documentation)
...@@ -180,7 +186,7 @@ composer require longman/telegram-bot ...@@ -180,7 +186,7 @@ composer require longman/telegram-bot
### Choose how to retrieve Telegram updates ### Choose how to retrieve Telegram updates
The bot can handle updates with **Webhook** or **getUpdates** method: The bot can handle updates with [**Webhook**](#webhook-installation) or [**getUpdates**](#getupdates-installation) method:
| | Webhook | getUpdates | | | Webhook | getUpdates |
| ---- | :----: | :----: | | ---- | :----: | :----: |
...@@ -188,7 +194,6 @@ The bot can handle updates with **Webhook** or **getUpdates** method: ...@@ -188,7 +194,6 @@ The bot can handle updates with **Webhook** or **getUpdates** method:
| Host with https | Required | Not required | | Host with https | Required | Not required |
| MySQL | Not required | ([Not](#getupdates-without-database)) Required | | MySQL | Not required | ([Not](#getupdates-without-database)) Required |
## Webhook installation ## Webhook installation
Note: For a more detailed explanation, head over to the [example-bot repository][example-bot-repository] and follow the instructions there. Note: For a more detailed explanation, head over to the [example-bot repository][example-bot-repository] and follow the instructions there.
...@@ -444,9 +449,9 @@ $telegram->enableExternalMySql($external_pdo_connection) ...@@ -444,9 +449,9 @@ $telegram->enableExternalMySql($external_pdo_connection)
All methods implemented can be used to manage channels. All methods implemented can be used to manage channels.
With [admin commands](#admin-commands) you can manage your channels directly with your bot private chat. With [admin commands](#admin-commands) you can manage your channels directly with your bot private chat.
### Commands ## Commands
#### Predefined Commands ### Predefined Commands
The bot is able to recognise commands in a chat with multiple bots (/command@mybot). The bot is able to recognise commands in a chat with multiple bots (/command@mybot).
...@@ -472,14 +477,14 @@ Here's the list: ...@@ -472,14 +477,14 @@ Here's the list:
- Favourite colour? */black, /red* - Favourite colour? */black, /red*
- Favourite number? */1, /134* - Favourite number? */1, /134*
#### Custom Commands ### Custom Commands
Maybe you would like to develop your own commands. Maybe you would like to develop your own commands.
There is a guide to help you [create your own commands][wiki-create-your-own-commands]. There is a guide to help you [create your own commands][wiki-create-your-own-commands].
Also, be sure to have a look at the [example commands][ExampleCommands-folder] to learn more about custom commands and how they work. Also, be sure to have a look at the [example commands][ExampleCommands-folder] to learn more about custom commands and how they work.
#### Commands Configuration ### Commands Configuration
With this method you can set some command specific parameters, for example: With this method you can set some command specific parameters, for example:
...@@ -548,7 +553,7 @@ $telegram->setCommandConfig('sendtochannel', [ ...@@ -548,7 +553,7 @@ $telegram->setCommandConfig('sendtochannel', [
``` ```
- Enjoy! - Enjoy!
### Upload and Download directory path ## Upload and Download directory path
To use the Upload and Download functionality, you need to set the paths with: To use the Upload and Download functionality, you need to set the paths with:
```php ```php
...@@ -580,7 +585,11 @@ If you like living on the edge, please report any bugs you find on the ...@@ -580,7 +585,11 @@ If you like living on the edge, please report any bugs you find on the
## Contributing ## Contributing
See [CONTRIBUTING](.github/CONTRIBUTING.md) for more information. See [CONTRIBUTING](CONTRIBUTING.md) for more information.
## Security
See [SECURITY](SECURITY.md) for more information.
## Security ## Security
...@@ -599,7 +608,7 @@ Thank you for keeping this project alive :pray: ...@@ -599,7 +608,7 @@ Thank you for keeping this project alive :pray:
- [![OpenCollective](https://user-images.githubusercontent.com/9423417/59235978-a561d500-8be3-11e9-89be-82ec54be1546.png) OpenCollective.com/php-telegram-bot][OpenCollective] - [![OpenCollective](https://user-images.githubusercontent.com/9423417/59235978-a561d500-8be3-11e9-89be-82ec54be1546.png) OpenCollective.com/php-telegram-bot][OpenCollective]
- [![Ko-fi](https://user-images.githubusercontent.com/9423417/59235976-a561d500-8be3-11e9-911d-b1908c3e6a33.png) Ko-fi.com/phptelegrambot][Ko-fi] - [![Ko-fi](https://user-images.githubusercontent.com/9423417/59235976-a561d500-8be3-11e9-911d-b1908c3e6a33.png) Ko-fi.com/phptelegrambot][Ko-fi]
- [![Tidelift](https://user-images.githubusercontent.com/9423417/59235982-a6930200-8be3-11e9-8ac2-bfb6991d80c5.png) Tidelift.com/longman/telegram-bot][Tidelift] - [![Tidelift](https://user-images.githubusercontent.com/9423417/59235982-a6930200-8be3-11e9-8ac2-bfb6991d80c5.png) Tidelift.com/longman/telegram-bot][Tidelift]
- [![Liberapay](https://user-images.githubusercontent.com/9423417/59235977-a561d500-8be3-11e9-9d16-bc3b13d3ceba.png) Liberapay.com/PHP-Telegram-Bot][liberapay] - [![Liberapay](https://user-images.githubusercontent.com/9423417/59235977-a561d500-8be3-11e9-9d16-bc3b13d3ceba.png) Liberapay.com/PHP-Telegram-Bot][Liberapay]
- [![PayPal](https://user-images.githubusercontent.com/9423417/59235981-a5fa6b80-8be3-11e9-9761-15eb7a524cb0.png) PayPal.me/noplanman][PayPal-noplanman] (account of @noplanman) - [![PayPal](https://user-images.githubusercontent.com/9423417/59235981-a5fa6b80-8be3-11e9-9761-15eb7a524cb0.png) PayPal.me/noplanman][PayPal-noplanman] (account of @noplanman)
- [![Bitcoin](https://user-images.githubusercontent.com/9423417/59235974-a4c93e80-8be3-11e9-9fde-260c821b6eae.png) 166NcyE7nDxkRPWidWtG1rqrNJoD5oYNiV][Bitcoin] - [![Bitcoin](https://user-images.githubusercontent.com/9423417/59235974-a4c93e80-8be3-11e9-9fde-260c821b6eae.png) 166NcyE7nDxkRPWidWtG1rqrNJoD5oYNiV][Bitcoin]
- [![Ethereum](https://user-images.githubusercontent.com/9423417/59235975-a4c93e80-8be3-11e9-8762-7a47c62c968d.png) 0x485855634fa212b0745375e593fAaf8321A81055][Ethereum] - [![Ethereum](https://user-images.githubusercontent.com/9423417/59235975-a4c93e80-8be3-11e9-8762-7a47c62c968d.png) 0x485855634fa212b0745375e593fAaf8321A81055][Ethereum]
...@@ -636,7 +645,7 @@ Credit list in [CREDITS](CREDITS) ...@@ -636,7 +645,7 @@ Credit list in [CREDITS](CREDITS)
[OpenCollective]: https://opencollective.com/php-telegram-bot "Support us on Open Collective" [OpenCollective]: https://opencollective.com/php-telegram-bot "Support us on Open Collective"
[Ko-fi]: https://ko-fi.com/phptelegrambot "Support us on Ko-fi" [Ko-fi]: https://ko-fi.com/phptelegrambot "Support us on Ko-fi"
[Tidelift]: https://tidelift.com/subscription/pkg/packagist-longman-telegram-bot?utm_source=packagist-longman-telegram-bot&utm_medium=referral&utm_campaign=readme "Support us on Tidelift" [Tidelift]: https://tidelift.com/subscription/pkg/packagist-longman-telegram-bot?utm_source=packagist-longman-telegram-bot&utm_medium=referral&utm_campaign=readme "Support us on Tidelift"
[liberapay]: https://liberapay.com/PHP-Telegram-Bot "Donate with Liberapay" [Liberapay]: https://liberapay.com/PHP-Telegram-Bot "Donate with Liberapay"
[PayPal-noplanman]: https://paypal.me/noplanman "Donate with PayPal" [PayPal-noplanman]: https://paypal.me/noplanman "Donate with PayPal"
[Bitcoin]: https://www.blockchain.com/btc/address/166NcyE7nDxkRPWidWtG1rqrNJoD5oYNiV "Donate with Bitcoin" [Bitcoin]: https://www.blockchain.com/btc/address/166NcyE7nDxkRPWidWtG1rqrNJoD5oYNiV "Donate with Bitcoin"
[Ethereum]: https://etherscan.io/address/0x485855634fa212b0745375e593fAaf8321A81055 "Donate with Ethereum" [Ethereum]: https://etherscan.io/address/0x485855634fa212b0745375e593fAaf8321A81055 "Donate with Ethereum"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment