docs/contrib/telegram.md
require 'contrib/telegram.php';
/start to your bot and open https://api.telegram.org/bot{$TELEGRAM_TOKEN_HERE}/getUpdatesbefore('deploy', 'telegram:notify');
telegram_token – telegram bot token, requiredtelegram_chat_id — chat ID to push messages totelegram_proxy - proxy connection string in CURLOPT_PROXY form like:
http://proxy:80
socks5://user:password@host:3128
telegram_title – the title of application, default {{application}}telegram_text – notification message template
_{{user}}_ deploying `{{what}}` to *{{where}}*
telegram_success_text – success template, default:
Deploy to *{{where}}* successful
telegram_failure_text – failure template, default:
Deploy to *{{where}}* failed
If you want to notify only about beginning of deployment add this line only:
before('deploy', 'telegram:notify');
If you want to notify about successful end of deployment add this too:
after('deploy:success', 'telegram:notify:success');
If you want to notify about failed deployment add this too:
after('deploy:failed', 'telegram:notify:failure');
## Configuration
### telegram_title
[Source](https://github.com/deployphp/deployer/blob/master/contrib/telegram.php#L65)
Title of project
```php title="Default value"
return get('application', 'Project');
Telegram settings :::info Required Throws exception if not set. :::
:::info Required Throws exception if not set. :::
return 'https://api.telegram.org/bot' . get('telegram_token') . '/sendmessage';
Deploy message
'_{{user}}_ deploying `{{what}}` to *{{where}}*'
'Deploy to *{{where}}* successful'
'Deploy to *{{where}}* failed'
Notifies Telegram.
Notifies Telegram about deploy finish.
Notifies Telegram about deploy failure.