PHPackages                             westacks/telebot-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. westacks/telebot-laravel

ActiveLibrary[API Development](/categories/api)

westacks/telebot-laravel
========================

Telebot adapter for Laravel

4.4.1(2mo ago)1431.4k↓54.5%7MITPHPPHP ^8.2CI failing

Since Aug 15Pushed 2d ago2 watchersCompare

[ Source](https://github.com/westacks/telebot-laravel)[ Packagist](https://packagist.org/packages/westacks/telebot-laravel)[ RSS](/packages/westacks-telebot-laravel/feed)WikiDiscussions 4.x Synced 1w ago

READMEChangelog (10)Dependencies (14)Versions (25)Used By (0)

[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine/)

[![Project Logo](./.github/assets/logo.svg)](https://github.com/westacks/telebot-laravel)

[![Latest Stable Version](https://camo.githubusercontent.com/3d04e29f8299974a330cb7ccbcc681e42c76c0d4e1532a6d93e9bf2f76229e12/68747470733a2f2f706f7365722e707567782e6f72672f7765737461636b732f74656c65626f742d6c61726176656c2f762f737461626c652e737667)](https://packagist.org/packages/westacks/telebot-laravel)[![Total Downloads](https://camo.githubusercontent.com/2a93b202cd0875165fbaf206c04f56d734f4e8c7b4f78b69f763a4a6f68a9301/68747470733a2f2f706f7365722e707567782e6f72672f7765737461636b732f74656c65626f742d6c61726176656c2f642f746f74616c2e737667)](https://packagist.org/packages/westacks/telebot-laravel)[![License](https://camo.githubusercontent.com/82ffc97603c888c7499c4f0874c3ca588f12ce5f03d1c5cf1aa696b3f795c677/68747470733a2f2f706f7365722e707567782e6f72672f7765737461636b732f74656c65626f742d6c61726176656c2f6c6963656e73652e737667)](https://packagist.org/packages/westacks/telebot-laravel)[![Pest](https://github.com/westacks/telebot-laravel/actions/workflows/tests.yml/badge.svg)](https://github.com/westacks/telebot-laravel/actions/workflows/main.yml)

TeleBot is a PHP library for telegram bots development. This project is a Laravel adapter for [TeleBot](https://github.com/westacks/telebot)

Installation
------------

[](#installation)

Install the package with composer:

```
composer require westacks/telebot-laravel
```

Complete setup with the following command:

```
php artisan telebot:install
```

Farther steps
-------------

[](#farther-steps)

Documentation for the library can be found on the [website](https://westacks.github.io/telebot/).

Features
--------

[](#features)

### Laravel Support

[](#laravel-support)

Library provides a Facade, artisan commands and notification channel to simplify the development process of your bot, if you are using Laravel:

##### Laravel Boost Skill

[](#laravel-boost-skill)

This package ships with a Laravel Boost skill. Install it via:

```
php artisan boost:add-skill westacks/telebot-laravel
```

##### Facade

[](#facade)

```
TeleBot::getMe();
TeleBot::bot('bot2')->getMe();
```

##### Creating update handlers

[](#creating-update-handlers)

You can create different types of update handlers or bot kernel with the following command:

```
$ php artisan make:telebot:kernel
$ php artisan make:telebot:update-handler
$ php artisan make:telebot:command-handler
$ php artisan make:telebot:callback-handler
$ php artisan make:telebot:input-handler
```

##### Automatic webhook generation

[](#automatic-webhook-generation)

After you insert your bot token, to create a webhook you need only to fire the following command:

```
$ php artisan telebot:webhook --setup
```

Route for handling updates is generated automatically for your `APP_URL`

##### Long polling

[](#long-polling)

If you are not using webhook, or want to use bot in local or test environment, you may start long polling by only firyng this command:

```
$ php artisan telebot:polling
```

##### Setup commands autocompletion

[](#setup-commands-autocompletion)

The following command will automatically setup autocompletion for all registered bot commands on Telegram servers:

```
$ php artisan telebot:commands --setup
```

##### Notification channel

[](#notification-channel)

```
