devskyfly / yii-extension-telegram-target
Installs: 437
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- devskyfly/php56: ^v1.0.0
- longman/telegram-bot: 0.64.0
- yiisoft/yii2: ~2.0.0
This package is auto-updated.
Last update: 2024-11-25 14:52:59 UTC
README
Realize telegram chat as log target.
Config targets.
'components' = [ 'log' => [ 'targets' => [ [ 'class' => 'devskyfly\yiiExtensionTelegramTarget\TelegramTarget', 'chatId' => "", 'botToken' => "BOT:TOKEN", 'botUserName' => 'BOTNAME', 'levels' => ['error', 'warning'], 'categories' => ['yii\db\*'], 'except' => [ 'yii\web\*', ], ], ... ] ]
Bot config and group create
- Ask @Botfather for new bot (/newbot)
- Set bot name
- Set bot username
- Copy tocken
- Create group
- Add bot to group
- Write several masseges
- Make request https://api.telegram.org/bot**YourBOTToken**/getUpdates and get chatId