Skip to content
This repository was archived by the owner on Jul 27, 2021. It is now read-only.

r-everse/telegram-bundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deprecation notice

This package is deprecated and will soon be removed. We suggest using irazasyed/telegram-bot-sdk directly.

Telegram Bundle

Symfony integration for Telegram SDK.

Latest Stable Version Total Downloads Latest Unstable Version License

Installation

Step 1: Download the Bundle

You can install this bundle using Composer:

composer require r-everse/telegram-bundle:^0.1

Step 2: Enable the Bundle

Then, 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(),
        ];

        // ...
    }

    // ...
}

Configuration

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
    // ...

Usage

$this->getContainer()->get('telegram.chat.my_chat_alias')->sendMessage('Hello world!');

About

Symfony integration for Telegram SDK.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages