sonko-dmitry/yii2-telegram-bot-api Telegram bot api component for Yii2

apitelegrambot

Telegram bot API for Yii2

Packagist Dependency Status Packagist Packagist

This extension is the way to integrate telegram-bot/api wrapper with your Yii2 application.

Installation

The preferred way to install this extension is through composer.

To install, either run

 $ php composer.phar require sonko-dmitry/yii2-telegram-bot-api:*

or add

 "sonko-dmitry/yii2-telegram-bot-api": "*"

to the require section of your composer.json file.

Usage

  1. Add the component configuration in your global main.php config file:

    'components' => [
     'bot' => [
         'class' => 'SonkoDmitry\Yii\TelegramBot\Component',
         'apiToken' => 'YOUR_BOT_API_TOKEN',
     ],
    ],
  2. Now you can use component

    \Yii::$app->bot->sendMessage(1234567, 'Hello world!');

    Where "1234567" receiver telegram id or chat id.

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

Comments



v1.0.0 is the latest of one release



BSD-3-Clause license
Stats
20 github stars & 6 github forks
18 downloads in the last day
167 downloads in the last 30 days
30552 total downloads