kostikpenzin/yii2-slackbot Yii bot for sending messages (alerts) to Slack

alertapiphpbotphp7slack

Yii 2 SlackBot

Latest Stable Version Total Downloads Latest Unstable Version License Monthly Downloads

Yii bot for sending messages (alerts) to Slack.

Setup

Add the kostikpenzin/yii2-slackbot package to your composer.json

composer require kostikpenzin/yii2-slackbot

Add the component to your config in the components section:

'components' => [
    // ...
    'slackbot' => [
        'class' => 'kostikpenzin\SlackBot\Bot',
        '_token' => 'Asdw-111111111-2222222222-3333333333',
        '_channel' => 'Finanso_alert', // default channel
        '_username' => 'Finanso_SlackBot',
        '_icon' => ':mega:'
    ]
]

Using default settings in your Application:

\Yii::$app
  ->slackbot
  ->message('Message.')
  ->send();

Using custom settings in your Application:

\Yii::$app
  ->slackbot
  ->channel('Finanso_alert')
  ->user('Finanso_SlackBot')
  ->icon(':mega:')
  ->message('Message.')
  ->send();

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

Comments



v0.1.4 is the latest of 14 releases



MIT license
Stats
1 github stars & 0 github forks
0 downloads in the last day
15 downloads in the last 30 days
34 total downloads