PHPackages                             blue\_skies/telegram-bot-helper - 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. blue\_skies/telegram-bot-helper

ActiveLibrary[API Development](/categories/api)

blue\_skies/telegram-bot-helper
===============================

Telegram bot integration with laravel

1.5(2y ago)27MITPHPPHP &gt;=8.1

Since Feb 2Pushed 1y ago1 watchersCompare

[ Source](https://github.com/asadbekasadbek/blue_skies)[ Packagist](https://packagist.org/packages/blue_skies/telegram-bot-helper)[ Docs](https://github.com/blue_skies/telegram-bot-helper)[ RSS](/packages/blue-skies-telegram-bot-helper/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (2)Versions (6)Used By (0)

[ ![](blue_sky.webp)](https://packagist.org/packages/blue_skies/telegram-bot-helper)

package blue skies telegram-bot-helper
======================================

[](#package-blue-skies-telegram-bot-helper)

[![Static Badge](https://camo.githubusercontent.com/60639382eaf60cba39618c2608d309e6f644d07c80afc07fc2e52c09a17942a7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f25323074656c656772616d2d626f742d68656c706572)](https://packagist.org/packages/blue_skies/telegram-bot-helper)[![License](https://camo.githubusercontent.com/4a64c31c71966d152c876eea1f35e85fbd33d57ddf5754260a41f053aa72c5b2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c61726176656c2f6672616d65776f726b)](https://packagist.org/packages/blue_skies/telegram-bot-helper)[![Загрузки](https://camo.githubusercontent.com/88ffc940d5ed3a743ed4ba37a0d65fe9c16afa961c5f0ebc13972832e2eec2ac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626c75655f736b6965732f74656c656772616d2d626f742d68656c7065723f7374796c653d666c61742d737175617265)](https://packagist.org/packages/blue_skies/telegram-bot-helper)[ ![Latest Stable Version](https://camo.githubusercontent.com/e4c329e234cf5e32ce0816bcd4c6885a0e744bd708c22c27af0ddf6521115151/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6173616462656b6173616462656b2f626c75655f736b6965732e737667)](https://packagist.org/packages/blue_skies/telegram-bot-helper)

Installation
============

[](#installation)

You can install the package via composer:

```
composer require blue_skies/telegram-bot-helper
```

Quick start
===========

[](#quick-start)

open the `.env` file and add the Telegram bot token to it

```
TELEGRAM_BOT_TOKEN = telegram bot token
```

```
 php artisan make:controller TestController
```

```
use BlueSkies\TelegramBotHelper\Traits\TelegramBotHelper;

class TestController extends Controller
{
    use TelegramBotHelper;
    public  function index()
    {
      return  self::SendTelegramMessage('chat_id','Test');
    }
}

```

```
Route::post('/telegram/message',[\App\Http\Controllers\TestController::class,'index']);
```

[\#sendMessag](#sendmessage)
[\#forwardMessag](#forwardmessage)
[\#forwardMessage](#forwardmessages)
[\#copyMessag](#copymessage)
[\#copyMessage](#copymessages)
[\#sendPhot](#sendphoto)
[\#sendAudi](#sendaudio)
[\#sendDocumen](#senddocument)
[\#sendVide](#sendvideo)
[\#sendAnimatio](#sendanimation)
[\#sendVoic](#sendvoice)
[\#sendVideoNot](#sendvideonote)
[\#sendMediaGrou](#sendmediagroup)
[\#sendLocatio](#sendlocation)
[\#sendVenu](#sendvenue)
[\#sendContac](#sendcontact)
[\#sendPol](#sendpoll)
[\#sendDic](#senddice)
[\#sendChatActio](#sendchataction)
[\#setMessageReactio](#setmessagereaction)
[\#getUserProfilePhoto](#getuserprofilephotos)
[\#getFil](#getfile)
[\#banChatMembe](#banchatmember)
[\#unbanChatMembe](#unbanchatmember)
[\#restrictChatMembe](#restrictchatmember)
[\#promoteChatMembe](#promotechatmember)
[\#setChatAdministratorCustomTitl](#setchatadministratorcustomTitle)
[\#banChatSenderCha](#banchatsenderchat)
[\#unbanChatSenderCha](#unbanchatsenderchat)
[\#setChatPermission](#setchatpermissions)
[\#exportChatInviteLin](#exportchattnvitelink)
[\#createChatInviteLin](#createchattnvitelink)
[\#editChatInviteLin](#editchatinvitelink)
[\#revokeChatInviteLin](#revokechatinvitelink)
[\#approveChatJoinReques](#approvechatjoinrequest)
[\#declineChatJoinReques](#declinechatjoinrequest)
[\#setChatPhot](#setchatphoto)
[\#deleteChatPhot](#deletechatphoto)
[\#setChatTitl](#setchattitle)
[\#setChatDescriptio](#setchatdescription)
[\#pinChatMessag](#pinchatmessage)
[\#unpinChatMessag](#unpinchatmessage)
[\#unpinAllChatMessage](#unpinallchatmessages)
[\#leaveCha](#leavechat)
[\#getCha](#getchat)
[\#getChatAdministrator](#getchatadministrators)
[\#getChatMemberCoun](#getchatmembercount)
[\#getChatMembe](#getchatmember)
[\#setChatStickerSe](#setchatstickerset)
[\#deleteChatStickerSe](#deletechatstickerset)
[\#getForumTopicIconSticker](#getforumtopicIconstickers)
[\#createForumTopi](#createforumtopic)
[\#editForumTopi](#editforumtopic)
[\#closeForumTopi](#closeforumtopic)
[\#reopenForumTopi](#reopenforumtopic)
[\#deleteForumTopi](#deleteforumtopic)
[\#unpinAllForumTopicMessage](#unpinallforumtopicmessages)
[\#editGeneralForumTopi](#editgeneralforumtopic)
[\#closeGeneralForumTopi](#closegeneralforumtopic)
[\#reopenGeneralForumTopi](#reopengeneralforumtopic)
[\#hideGeneralForumTopi](#hidegeneralforumtopic)
[\#unhideGeneralForumTopi](#unhidegeneralforumtopic)
[\#unpinAllGeneralForumTopicMessage](#unpinallgeneralforumtopicmessages)
[\#answerCallbackQuer](#answercallbackquery)
[\#getUserChatBoost](#getuserchatboosts)
[\#setMyCommand](#setmycommands)
[\#deleteMyCommand](#deletemycommands)
[\#getMyCommand](#getmycommands)
[\#setMyNam](#setmyName)
[\#getMyNam](#getmyName)
[\#setMyDescriptio](#setmydescription)
[\#getMyDescriptio](#getmydescription)
[\#setMyShortDescriptio](#setmyshortdescription)
[\#getMyShortDescriptio](#getmyshortdescription)
[\#setChatMenuButto](#setchatmenubutton)
[\#getChatMenuButto](#getchatMenubutton)
[\#setMyDefaultAdministratorRight](#setmydefaultadministratorrights)
[\#getMyDefaultAdministratorRight](#getmydefaultadministratorrights)
[\#editMessageText](#editmessagetext)
[\#editMessageCaption](#editmessagecaption)
[\#editMessageMedia](#editmessagemedia)
[\#editMessageLiveLocation](#editmessagelivelocation)
[\#stopMessageLiveLocation](#stopmessageliveLocation)
[\#editMessageReplyMarkup](#editmessagereplymarkup)
[\#stopPoll](#stoppoll)
[\#deleteMessage](#deletemessage)
[\#deleteMessages](#deletemessages)
[\#Webhooks](#webhooks)

 `sendMessage`
SendTelegramMessage Parameters:

```
   public static function SendTelegramMessage(
        int|string $chatId,
        string     $text,
        ?string    $messageThreadId = null,
        string     $parseMode = 'HTML',
        ?array     $entities = null,
        ?bool      $disableNotification = null,
        ?bool      $protectContent = null,
                   $linkPreviewOptions = null,
                   $replyParameters = null,
                   $replyMarkup = null
    ): JsonResponse
```

 `forwardMessage`
SendTelegramMessage SendTelegramForwardMessage:

```
 public static function SendTelegramForwardMessage(
        int|string $chatId,
        int        $messageThreadId = null,
        int|string $fromChatId = null,
        ?bool      $disableNotification = null,
        ?bool      $protectContent = null,
        int        $messageId
    ): JsonResponse
```

 `forwardMessages`
SendTelegramMessage SendTelegramForwardMessages:

```
    public static function SendTelegramForwardMessages(
        int|string $chatId,
        int        $messageThreadId,
        int|string $fromChatId,
        array|int  $messageIds,
        bool       $disable_notification = false,
        bool       $protectContent = false
    ): JsonResponse
```

 `copyMessage`
SendTelegramMessage SendTelegramCopyMessage:

```
      public static function SendTelegramCopyMessage(
        int|string $chatId,
        int        $messageThreadId,
        int|string $fromChatId,
        array|int  $messageIds,
        ?bool      $disable_notification = null,
        ?bool      $protectContent = null,
        ?bool      $removeCaption = null
    ): JsonResponse
```

 `copyMessages`
SendTelegramMessage SendTelegramCopyMessages:

```
      public static function SendTelegramCopyMessages(
        int|string $chatId,
        int        $messageThreadId,
        int|string $fromChatId,
        array|int  $messageIds,
        ?bool      $disable_notification = null,
        ?bool      $protectContent = null,
        ?bool      $removeCaption = null
    ): JsonResponse
```

 `sendPhoto`
SendTelegramMessage SendTelegramPhoto:

```
   public function SendTelegramPhoto(
        int|string $chatId,
        ?int       $messageThreadId = null,
        string     $photo,
        ?string    $caption = null,
        ?string    $parseMode = 'HTML',
        ?array     $captionEntities = null,
        bool       $hasSpoiler = null,
        bool       $disableNotification = null,
        ?bool      $protectContent = null,
                   $replyParameters = null,
                   $replyMarkup = null
    ): JsonResponse
```

 `sendAudio`
SendTelegramMessage SendTelegramAudio:

```
      public static function SendTelegramAudio(
        int|string $chatId,
        ?int       $messageThreadId = null,
        string     $audio,
        ?string    $caption = null,
        ?string    $parseMode = 'HTML',
        ?array     $captionEntities = null,
        ?int       $duration = null,
        ?string    $performer = null,
        ?string    $title = null,
        ?string    $thumbnail = null,
        ?bool      $disableNotification = null,
        ?bool      $protectContent = null,
                   $replyParameters = null,
                   $replyMarkup = null
    ): JsonResponse
```

 `sendDocument`
SendTelegramDocument Parameters:

```
      public static function SendTelegramDocument(
        int|string $chatId,
        ?int       $messageThreadId = null,
        string     $document,
        ?string    $thumbnail = null,
        ?string    $caption = null,
        ?string    $parseMode = 'HTML',
        ?array     $captionEntities = null,
        ?bool      $disableContentTypeDetection = null,
        ?bool      $disableNotification = null,
        ?bool      $protectContent = null,
        ?string    $title = null,

                   $replyParameters = null,
                   $replyMarkup = null
    ): JsonResponse
```

 `sendVideo`
SendTelegramVideo Parameters:

```
    public static function SendTelegramVideo(
        int|string $chatId,
        ?int       $messageThreadId = null,
        string     $video,
        ?int       $duration = null,
        ?int       $width = null,
        ?int       $height = null,
        ?string    $thumbnail = null,
        ?string    $caption = null,
        ?string    $parseMode = 'HTML',
        ?array     $captionEntities = null,
        ?bool      $hasSpoiler = null,
        ?bool      $supportsStreaming = null,
        ?bool      $disableNotification = null,
        ?bool      $protectContent = null,
                   $replyParameters = null,
                   $replyMarkup = null,

    ): JsonResponse
```

 `sendAnimation`
SendTelegramAnimation Parameters:

```
    public static function SendTelegramAnimation(
        int|string $chatId,
        ?int       $messageThreadId = null,
        string     $animation,
        ?int       $duration = null,
        ?int       $width = null,
        ?int       $height = null,
        ?string    $thumbnail = null,
        ?string    $caption = null,
        ?string    $parseMode = 'HTML',
        ?array     $captionEntities = null,
        ?bool      $hasSpoiler = null,
        ?bool      $disableNotification = null,
        ?bool      $protectContent = null,
                   $replyParameters = null,
                   $replyMarkup = null
    ): JsonResponse
```

 `sendVoice`
SendTelegramVoice Parameters:

```
    public static function SendTelegramVoice(
        int|string $chatId,
        ?int       $messageThreadId = null,
        string     $voice,
        ?string    $caption = null,
        ?string    $parseMode = 'HTML',
        ?array     $captionEntities = null,
        ?int       $duration = null,
        ?bool      $disableNotification = null,
        ?bool      $protectContent = null,
                   $replyParameters = null,
                   $replyMarkup = null
    ): JsonResponse
```

 `sendVideoNote`
SendTelegramVideoNote Parameters:

```
    public static function SendTelegramVideoNote(
        int|string $chatId,
        ?int       $messageThreadId = null,
        string     $videoNote,
        ?int       $duration = null,
        ?int       $length = null,
        ?int       $thumbnail = null,
        ?bool      $disableNotification = null,
        ?bool      $protectContent = null,
                   $replyParameters = null,
                   $replyMarkup = null
    ): JsonResponse
```

 `sendMediaGroup`
SendTelegramMediaGroup Parameters:

```
    public static function SendTelegramMediaGroup(
        int|string $chatId,
        ?int       $messageThreadId = null,
        array      $media,
        ?bool      $disableNotification = null,
        ?bool      $protectContent = null,
        ?array     $captionEntities = null,
        ?bool      $supportsStreaming = null,
                   $replyParameters = null,
                   $replyMarkup = null,

    ): JsonResponse
```

 `sendLocation`
SendTelegramLocation Parameters:

```
    public static function SendTelegramLocation(
        int|string $chatId,
        ?int       $messageThreadId = null,
        float      $latitude,
        float      $longitude,
        float      $horizontalAccuracy = null,
        float      $livePeriod = null,
        float      $heading = null,
        float      $proximityAlertRadius = null,
        ?bool      $disableNotification = null,
        ?bool      $protectContent = null,
                   $replyParameters = null,
                   $replyMarkup = null,
    ): JsonResponse
```

 `sendVenue`
SendTelegramVenue Parameters:

```
    public static function SendTelegramVenue(
        int|string $chatId,
        ?int       $messageThreadId = null,
        float      $latitude,
        float      $longitude,
        string     $title,
        string     $address,

        ?string    $foursquareId = null,
        ?string    $foursquareType = null,
        ?string    $googlePlaceId = null,
        ?string    $googlePlaceType = null,
        ?bool      $disableNotification = null,
        ?bool      $protectContent = null,
                   $replyParameters = null,
                   $replyMarkup = null
    ): JsonResponse
```

 `sendContact`
SendTelegramContact Parameters:

```
    public static function SendTelegramContact(
        int|string $chatId,
        ?int       $messageThreadId = null,
        string     $phoneNumber,
        string     $firstName,
        ?string    $lastName = null,
        ?string    $vcard = null,
        ?bool      $disableNotification = null,
        ?bool      $protectContent = null,
                   $replyParameters = null,
                   $replyMarkup = null
    ): JsonResponse
```

 `sendPoll`
SendTelegramPoll Parameters:

```
    public static function SendTelegramPoll(
        int|string $chatId,
        ?int       $messageThreadId = null,
        string     $question,
        array      $options,
        ?bool      $isAnonymous = null,
        ?string    $type = null,
        ?bool      $allowsMultipleAnswers = null,
        ?int       $correctOptionId = null,
        ?string    $explanation = null,
        ?string    $explanationParseMode = null,
        ?array     $explanationEntities = null,
        ?int       $openPeriod = null,
        ?int       $closeDate = null,
        ?bool      $isClosed = null,
        ?bool      $disableNotification = null,
        ?bool      $protectContent = null,
                   $replyParameters = null,
                   $replyMarkup = null
    ): JsonResponse
```

 `sendDice`
SendTelegramDice Parameters:

```
    public static function SendTelegramDice(
        int|string $chatId,
        ?int       $messageThreadId = null,
        string     $emoji,
        ?bool      $disableNotification = null,
        ?bool      $protectContent = null,
                   $replyParameters = null,
                   $replyMarkup = null
    ): JsonResponse
```

 `sendChatAction`
SendTelegramChatAction Parameters:

```
    public static function SendTelegramChatAction(
        int|string $chatId,
        ?int       $messageThreadId = null,
        string     $action
    ): JsonResponse
```

 `setMessageReaction`
SendTelegramMessageReaction Parameters:

```
    public static function SendTelegramMessageReaction(
        int|string $chatId,
        int        $messageId,
        ?array     $reaction = null,
        ?bool      $isBig = null,

    ): JsonResponse
```

 `getUserProfilePhotos`
getTelegramUserProfilePhotos Parameters:

```
    public static function getTelegramUserProfilePhotos(
        int  $userId,
        ?int $offset = null,
        ?int $limit = null
    ): JsonResponse
```

 `getFile`
getTelegramFile Parameters:

```
    public static function getTelegramFile(
        string $fileId,
    ): JsonResponse
```

 `banChatMember`
banTelegramChatMember Parameters:

```
    public static function banTelegramChatMember(
        int|string $chatId,
        int        $userId,
        ?int       $untilDate = null,
        ?bool      $revokeMessages = null
    ): JsonResponse
```

 `unbanChatMember`
unbanTelegramChatMember Parameters:

```
    public static function unbanTelegramChatMember(
        int|string $chatId,
        int        $userId,
        ?bool      $onlyIfBanned = null
    ): JsonResponse
```

 `restrictChatMember`
restrictTelegramChatMember Parameters:

```
    public static function restrictTelegramChatMember(
        int|string $chatId,
        int        $userId,
        array      $permissions,
        ?bool      $useIndependentChatPermissions = null,
        ?int       $untilDate = null
    ): JsonResponse
```

 `promoteChatMember`
promoteTelegramChatMember Parameters:

```
    public static function promoteTelegramChatMember(
        int|string $chatId,
        int        $userId,
        ?bool      $isAnonymous = null,
        ?bool      $canManageChat = null,
        ?bool      $canPostMessages = null,
        ?bool      $canEditMessages = null,
        ?bool      $canDeleteMessages = null,
        ?bool      $canManageVoiceChats = null,
        ?bool      $canRestrictMembers = null,
        ?bool      $canPromoteMembers = null,
        ?bool      $canChangeInfo = null,
        ?bool      $canInviteUsers = null,
        ?bool      $canPinMessages = null,
        ?bool      $canPostStories = null,
        ?bool      $canEditStories = null,
        ?bool      $canDeleteStories = null,
        ?bool      $canManageTopics = null,
    ): JsonResponse
```

 `setChatAdministratorCustomTitle`
setTelegramChatAdministratorCustomTitle Parameters:

```
    public static function setTelegramChatAdministratorCustomTitle(
        int|string $chatId,
        int        $userId,
        string     $customTitle,
    ): JsonResponse
```

 `banChatSenderChat`
banTelegramChatSenderChat Parameters:

```
    public static function banTelegramChatSenderChat(
        int|string $chatId,
        int        $senderChatId,
    ): JsonResponse
```

 `unbanChatSenderChat`
unbanTelegramChatSenderChat Parameters:

```
    public static function unbanTelegramChatSenderChat(
        int|string $chatId,
        int        $senderChatId
    ): JsonResponse
```

 `setChatPermissions`
setTelegramChatPermissions Parameters:

```
    public static function setTelegramChatPermissions(
        int|string $chatId,
        array      $permissions,
        ?bool      $useIndependentChatPermissions = null
    ): JsonResponse
```

 `exportChatInviteLink`
exportTelegramChatInviteLink Parameters:

```
    public static function exportTelegramChatInviteLink(
        int|string $chatId,
    ): JsonResponse
```

 `createChatInviteLink`
createTelegramChatInviteLink Parameters:

```
    public static function createTelegramChatInviteLink(
        int|string $chatId,
        ?string    $name = null,
        ?int       $expireDate = null,
        ?int       $memberLimit = null,
        ?bool      $createsJoinRequest = null
    ): JsonResponse
```

 `editChatInviteLink`
editTelegramChatInviteLink Parameters:

```
    public static function editTelegramChatInviteLink(
        int|string $chatId,
        string     $inviteLink,
        ?string    $name = null,
        ?int       $expireDate = null,
        ?int       $memberLimit = null,
        ?bool      $createsJoinRequest = null
    ): JsonResponse
```

 `revokeChatInviteLink`
revokeTelegramChatInviteLink Parameters:

```
    public static function revokeTelegramChatInviteLink(
        int|string $chatId,
        string     $inviteLink
    ): JsonResponse
```

 `approveChatJoinRequest`
approveTelegramChatJoinRequest Parameters:

```
    public static function approveTelegramChatJoinRequest(
        int|string $chatId,
        int        $userId,
    ): JsonResponse
```

 `declineChatJoinRequest`
declineTelegramChatJoinRequest Parameters:

```
    public static function declineTelegramChatJoinRequest(
        int|string $chatId,
        int        $userId,
    ): JsonResponse
```

 `setChatPhoto`
setTelegramChatPhoto Parameters:

```
    public static function setTelegramChatPhoto(
        int|string $chatId,
        string     $photo,
    ): JsonResponse
```

 `deleteChatPhoto`
deleteTelegramChatPhoto Parameters:

```
    public static function deleteTelegramChatPhoto(
        int|string $chatId,
    ): JsonResponse
```

 `setChatTitle`
setTelegramChatTitle Parameters:

```
    public static function setTelegramChatTitle(
        int|string $chatId,
        string     $title,
    ): JsonResponse
```

 `setChatDescription`
setTelegramChatDescription Parameters:

```
    public static function setTelegramChatDescription(
        int|string $chatId,
        string     $description,
    ): JsonResponse
```

 `pinChatMessage`
pinTelegramChatMessage Parameters:

```
    public static function pinTelegramChatMessage(
        int|string $chatId,
        int        $messageId,
        ?bool      $disableNotification = null,
    ): JsonResponse
```

 `unpinChatMessage`
unpinTelegramChatMessage Parameters:

```
    public static function unpinTelegramChatMessage(
        int|string $chatId,
        ?int       $messageId = null,
    ): JsonResponse
```

 `unpinAllChatMessages`
unpinAllTelegramChatMessages Parameters:

```
    public static function unpinAllTelegramChatMessages(
        int|string $chatId,

    ): JsonResponse
```

 `leaveChat`
leaveTelegramChat Parameters:

```
    public static function leaveTelegramChat(
        int|string $chatId,

    ): JsonResponse
```

 `getChat`
getTelegramChat Parameters:

```
    public static function getTelegramChat(
        int|string $chatId,

    ): JsonResponse
```

 `getChatAdministrators`
getTelegramChatAdministrators Parameters:

```
    public static function getTelegramChatAdministrators(
        int|string $chatId,

    ): JsonResponse
```

 `getChatMemberCount`
getTelegramChatMemberCount Parameters:

```
    public static function getTelegramChatMemberCount(
        int|string $chatId,

    ): JsonResponse
```

 `getChatMember`
getTelegramChatMember Parameters:

```
    public static function getTelegramChatMember(
        int|string $chatId,
        int        $userId

    ): JsonResponse
```

 `setChatStickerSet`
setTelegramChatStickerSet Parameters:

```
    public static function setTelegramChatStickerSet(
        int|string $chatId,
        string     $stickerSetName

    ): JsonResponse
```

 `deleteChatStickerSet`
deleteTelegramChatStickerSet Parameters:

```
    public static function deleteTelegramChatStickerSet(
        int|string $chatId,

    ): JsonResponse
```

 `createForumTopic`
createTelegramForumTopic Parameters:

```
    public static function createTelegramForumTopic(
        int|string $chatId,
        string     $name,
        ?int       $iconColor = null,
        ?string    $iconCustomEmojiId = null
    ): JsonResponse
```

 `editForumTopic`
editTelegramForumTopic Parameters:

```
    public static function editTelegramForumTopic(
        int|string $chatId,
        string     $name,
        int        $messageThreadId,
        ?int       $iconColor = null,
        ?string    $iconCustomEmojiId = null
    ): JsonResponse
```

 `closeForumTopic`
closeTelegramForumTopic Parameters:

```
    public static function closeTelegramForumTopic(
        int|string $chatId,
        int        $messageThreadId
    ): JsonResponse
```

 `reopenForumTopic`
reopenTelegramForumTopic Parameters:

```
    public static function reopenTelegramForumTopic(
        int|string $chatId,
        int        $messageThreadId
    ): JsonResponse
```

 `deleteForumTopic`
deleteTelegramForumTopic Parameters:

```
    public static function deleteTelegramForumTopic(
        int|string $chatId,
        int        $messageThreadId
    ): JsonResponse
```

 `unpinAllForumTopicMessages`
unpinAllTelegramForumTopicMessages Parameters:

```
    public static function unpinAllTelegramForumTopicMessages(
        int|string $chatId,
        int        $messageThreadId
    ): JsonResponse
```

 `editGeneralForumTopic`
editTelegramGeneralForumTopic Parameters:

```
    public static function editTelegramGeneralForumTopic(
        int|string $chatId,
        int        $name
    ): JsonResponse
```

 `closeGeneralForumTopic`
closeTelegramGeneralForumTopic Parameters:

```
    public static function closeTelegramGeneralForumTopic(
        int|string $chatId,
    ): JsonResponse
```

 `reopenGeneralForumTopic`
reopenTelegramGeneralForumTopic Parameters:

```
    public static function reopenTelegramGeneralForumTopic(
        int|string $chatId,
    ): JsonResponse
```

 `hideGeneralForumTopic`
hideTelegramGeneralForumTopic Parameters:

```
    public static function hideTelegramGeneralForumTopic(
        int|string $chatId,
    ): JsonResponse
```

 `unhideGeneralForumTopic`
unhideTelegramGeneralForumTopic Parameters:

```
    public static function unhideTelegramGeneralForumTopic(
        int|string $chatId,
    ): JsonResponse
```

 `unpinAllGeneralForumTopicMessages`
unpinAllTelegramGeneralForumTopicMessages Parameters:

```
    public static function unpinAllTelegramGeneralForumTopicMessages(
        int|string $chatId,
    ): JsonResponse
```

 `answerCallbackQuery`
answerTelegramCallbackQuery Parameters:

```
    public static function answerTelegramCallbackQuery(
        string  $callbackQueryId,
        ?string $text = null,
        ?bool   $showAlert = null,
        ?string $urlTG = null,
        ?int    $cacheTime = 0
    ): JsonResponse
```

 `getUserChatBoosts`
getTelegramUserChatBoosts Parameters:

```
    public static function getTelegramUserChatBoosts(
        int|string $chatId,
        int        $userId
    ): JsonResponse
```

 `setMyCommands`
setTelegramMyCommands Parameters:

```
    public static function setTelegramMyCommands(
        int|string $chatId,
        array      $commands,
                   $scope = null,
        ?string    $language_code = null
    ): JsonResponse
```

 `deleteMyCommands`
deleteTelegramMyCommands Parameters:

```
    public static function deleteTelegramMyCommands(
        int|string $chatId,
                   $scope = null,
        ?string    $language_code = null
    ): JsonResponse
```

 `getMyCommands`
getTelegramMyCommands Parameters:

```
    public static function getTelegramMyCommands(
        int|string $chatId,
                   $scope = null,
        ?string    $language_code = null
    ): JsonResponse
```

 `setMyName`
setTelegramMyName Parameters:

```
    public static function setTelegramMyName(
        int|string $chatId,
        ?string    $name = null,
        ?string    $language_code = null
    ): JsonResponse
```

 `getMyName`
getTelegramMyName Parameters:

```
    public static function getTelegramMyName(
        int|string $chatId,
        ?string    $language_code = null
    ): JsonResponse
```

 `setMyDescription`
setTelegramMyDescription Parameters:

```
    public static function setTelegramMyDescription(
        int|string $chatId,
        ?string    $description = null,
        ?string    $language_code = null
    ): JsonResponse
```

 `getMyDescription`
getTelegramMyDescription Parameters:

```
    public static function getTelegramMyDescription(
        int|string $chatId,
        ?string    $language_code = null
    ): JsonResponse
```

 `setMyShortDescription`
setTelegramMyShortDescription Parameters:

```
    public static function setTelegramMyShortDescription(
        int|string $chatId,
        ?string    $short_description = null,
        ?string    $language_code = null
    ): JsonResponse
```

 `getMyShortDescription`
getTelegramMyShortDescription Parameters:

```
    public static function getTelegramMyShortDescription(
        int|string $chatId,
        ?string    $language_code = null
    ): JsonResponse
```

 `setChatMenuButton`
setTelegramChatMenuButton Parameters:

```
    public static function setTelegramChatMenuButton(
        int|string $chatId,
        ?array     $menuButton = null,
        ?string    $language_code = null
    ): JsonResponse
```

 `setMyDefaultAdministratorRights`
setTelegramMyDefaultAdministratorRights Parameters:

```
    public static function setTelegramMyDefaultAdministratorRights(
        int|string $chatId,
                   $rights = null,
        ?bool      $for_channels = null
    ): JsonResponse
```

 `getMyDefaultAdministratorRights`
getTelegramMyDefaultAdministratorRights Parameters:

```
    public static function getTelegramMyDefaultAdministratorRights(
        int|string $chatId,
        ?bool      $for_channels = null
    ): JsonResponse
```

 `editMessageText`
editTelegramMessageText Parameters:

```
    public static function editTelegramMessageText(
        int|string $chatId,
        ?int       $messageId = null,
        ?string    $inlineMessageId = null,
        string     $text,
        ?string    $parseMode = null,
        ?array     $entities = null,
                   $linkPreviewOptions = null,
                   $replyMarkup = null
    ): JsonResponse
```

 `editMessageCaption`
editTelegramMessageCaption Parameters:

```
    public static function editTelegramMessageCaption(
        null|int|string $chatId = null,
        ?int            $messageId = null,
        ?string         $inlineMessageId = null,
        ?string         $caption = null,
        ?string         $parseMode = null,
        ?array          $captionEntities = null,
                        $replyMarkup = null
    ): JsonResponse
```

 `editMessageMedia`
editTelegramMessageMedia Parameters:

```
    public static function editTelegramMessageMedia(
        int|string $chatId = null,
        ?int       $messageId = null,
        ?string    $inlineMessageId = null,
                   $media,
                   $replyMarkup = null
    ): JsonResponse
```

 `editMessageLiveLocation`
editTelegramMessageLiveLocation Parameters:

```
    public static function editTelegramMessageLiveLocation(
        int|string $chatId = null,
        ?int       $messageId = null,
        ?string    $inlineMessageId = null,
        float      $latitude,
        float      $longitude,
        ?float     $horizontalAccuracy = null,
        ?int       $heading = null,
        ?int       $proximityAlertRadius = null,
                   $replyMarkup = null
    ): JsonResponse
```

 `stopMessageLiveLocation`
stopTelegramMessageLiveLocation Parameters:

```
    public static function stopTelegramMessageLiveLocation(
        int|string $chatId = null,
        ?int       $messageId = null,
        ?string    $inlineMessageId = null,
                   $replyMarkup = null
    ): JsonResponse
```

 `editMessageReplyMarkup`
editTelegramMessageReplyMarkup Parameters:

```
    public static function editTelegramMessageReplyMarkup(
        int|string $chatId = null,
        ?int       $messageId = null,
        ?string    $inlineMessageId = null,
                   $replyMarkup = null
    ): JsonResponse
```

 `stopPoll`
stopTelegramPoll Parameters:

```
    public static function stopTelegramPoll(
        int|string $chatId = null,
        ?int       $messageId = null,
                   $replyMarkup = null
    ): JsonResponse
```

 `deleteMessage`
deleteTelegramMessage Parameters:

```
    public static function deleteTelegramMessage(
        int|string $chatId,
        int        $messageId
    ): JsonResponse
```

 `deleteMessages`
deleteTelegramMessages Parameters:

```
    public static function deleteTelegramMessages(
        int|string $chatId,
        array      $messageIds
    ): JsonResponse
```

 `sendMessage`
SendTelegramReply Parameters:

```
    public static function SendTelegramReply(
    string $chatId,
    string $message,
    string $replyId,
    string $parseMode = 'HTML'
    ): JsonResponse
```

 `deleteMessage`
SendDeleteTelegramMessage Parameters:

```
    public static function SendDeleteTelegramMessage(
    string $chatId,
    string $messageId,
    ?int $seconds = 0
    ): JsonResponse
```

 `sendMessage`
SendTelegramMessageEntity Parameters:

```
    public static function SendTelegramMessageEntity(
    string $chatId,
    string $messageText,
    array $entities
    ): JsonResponse
```

Webhooks
========

[](#webhooks)

Telegram Bot API supports webhook. If you set webhook for your bot, Telegram will send updates to the specified url

The fastest way
---------------

[](#the-fastest-way)

change it to yours `bot_token` `your_url`

putting this in the search bar

[https://api.telegram.org/bot\_token/setwebhook?url=your\_url](https://api.telegram.org/bot_token/setwebhook?url=your_url)

#### example

[](#example)

`https://api.telegram.org/bot1310530208:AAHAKEpv_E9k3rWc09G7Z0rJVcKHGEBqo6c/setwebhook?url=https://example.com/api/telegram-bot/handle`

#### get the answer

[](#get-the-answer)

```
{"ok": true, "result" :true, "description": "Webhook is already set"}
```

#### create a controller

[](#create-a-controller)

```
   php artisan make:controller TelegramWebhookController
```

#### add to `api.php` file

[](#add-to-apiphp-file)

```
Route::controller(\App\Http\Controllers\TelegramWebhookController::class)->group(function () {
    Route::post('/telegram-bot/handle', 'handle');
});
```

#### write in controller

[](#write-in-controller)

```
use BlueSkies\TelegramBotHelper\Traits\TelegramBotHelper;

class TelegramWebhookController extends Controller
{
    use TelegramBotHelper;
    public function handle(Request $request)
    {
        $bodyContent = $request->getContent();
        return self::SendTelegramMessage('chat_id',"$bodyContent");
    }
}
```

#### write a chat something

[](#write-a-chat-something)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

5

Last Release

826d ago

PHP version history (2 changes)1.1PHP ^7.4|^8.0

1.2PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/90f7879b16f79c6218c72bcc4fcc04af8a3a5440c5c7bf7994305a688a777e84?d=identicon)[asadbekasadbek](/maintainers/asadbekasadbek)

---

Top Contributors

[![asadbekasadbek](https://avatars.githubusercontent.com/u/57292319?v=4)](https://github.com/asadbekasadbek "asadbekasadbek (3 commits)")

---

Tags

laraveltelegramtelegram bottelegram bot apitelegram phplaravel telegram

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/blue-skies-telegram-bot-helper/health.svg)

```
[![Health](https://phpackages.com/badges/blue-skies-telegram-bot-helper/health.svg)](https://phpackages.com/packages/blue-skies-telegram-bot-helper)
```

###  Alternatives

[irazasyed/telegram-bot-sdk

The Unofficial Telegram Bot API PHP SDK

3.3k4.5M84](/packages/irazasyed-telegram-bot-sdk)[telegram-bot-sdk/telegram-bot-sdk

The Telegram Bot API PHP SDK

32480.5k](/packages/telegram-bot-sdk-telegram-bot-sdk)[exileed/telegram-bot-api

The Telegram Bot API PHP

1614.1k](/packages/exileed-telegram-bot-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
