This package is deprecated and will soon be removed. We suggest using irazasyed/telegram-bot-sdk directly.
Symfony integration for Telegram SDK.
You can install this bundle using Composer:
composer require r-everse/telegram-bundle:^0.1Then, enable the bundle by adding it to the list of registered bundles
in the app/AppKernel.php file of your project:
<?php
// app/AppKernel.php
// ...
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = [
// ...
new Telegram\TelegramBundle\TelegramBundle(),
];
// ...
}
// ...
}Add it to app/config/config.yml.
telegram:
token: 'YOUR BOT TOKEN HERE'
chats:
my_chat_alias: -0000000 Add it to app/config/config_dev.yml.
parameters:
// ...
telegram.chat.class: Telegram\TelegramBundle\Service\NullChat
// ...$this->getContainer()->get('telegram.chat.my_chat_alias')->sendMessage('Hello world!');