PHPackages                             amirrh6/litegram - 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. amirrh6/litegram

ActiveLibrary[API Development](/categories/api)

amirrh6/litegram
================

Lightweight PHP wrapper library for Telegram Bot API

0.13.1(1y ago)033GPL-2.0-onlyPHP

Since Nov 12Pushed 1y ago1 watchersCompare

[ Source](https://github.com/amirrh6/Litegram)[ Packagist](https://packagist.org/packages/amirrh6/litegram)[ RSS](/packages/amirrh6-litegram/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (29)Used By (0)

Litegram
========

[](#litegram)

Lightweight PHP wrapper library for Telegram Bot API

Bot API version: [v7.11 (October 31, 2024)](https://core.telegram.org/bots/api#october-31-2024) - [Snapshot Link](https://web.archive.org/web/20241101091608/https://core.telegram.org/bots/api)

PHP version: 8.3 - Unknown compatibility with earlier (8+) or later versions.

- Minimal, Doesn't get in your way
- Fully documented, Employs identical names for methods and classes as those found in the official API
- Uses Guzzle as the HTTP client
- Provides type hints for IDE autocompletion

Litegram is still in early development stages so expect bugs and non-backward compatible changes.

Use Github Issues for comments, bug reports and questions.

TODOs:
======

[](#todos)

- Full implementation of all types (classes) and methods
- Provide built-in validations
- Concurrent (bulk) requests: Has been experimentally implemented for some methods
- Provide helper utilities (e.g. For formatting messages using HTML or Markdown) and builtin checks (e.g. Making sure the message text's length does not exceed 4096 chars)
- Async requests
- Better error handling (retry requests which failed due to network error etc ...)
- Update to Bot API 8.0
- Update to Bot API 8.1
- Update to Bot API 8.2
- Update to Bot API 8.3

Installation / Updating
-----------------------

[](#installation--updating)

`composer require amirrh6/litegram dev-main`

Usage and Examples
------------------

[](#usage-and-examples)

```
require_once './vendor/autoload.php';

// --- --- --- --- --- --- ---

$token = '0123456789:...';
$some_chat_id = '-100...';

// Options for Guzzle (https://docs.guzzlephp.org/en/stable/request-options.html)
$global_guzzle_options = [
    'timeout' => 10,
    // 'proxy' => 'http://localhost:8118',
];

// --- --- --- --- --- --- ---

use Litegram\SendMessageParams;
use Litegram\InlineKeyboardMarkup;
use Litegram\InlineKeyboardButton;
use Litegram\TelegramMethods;

try {
    // If the request doesn't fail, an object of type Litegram\Message will be returned
    $res = TelegramMethods::sendMessage(
        token: $token,
        params: SendMessageParams::build(
            chat_id: $some_chat_id,
            text: 'Test',
            reply_markup: InlineKeyboardMarkup::build([
                [
                    InlineKeyboardButton::build('Hi', callback_data: 'say_hi'),
                    InlineKeyboardButton::build('Bye', callback_data: 'say_bye'),
                ],
                [InlineKeyboardButton::build('Close', callback_data: 'close')],
            ]),
        ),
        // If you don't pass a guzzle_options array to each method or pass an empty one (default parameter), Litegram will check for existence of a global variable
        // named 'global_guzzle_options' and use it instead, if it exists.
        guzzle_options: [
            'timeout' => 5,
            // 'proxy' => 'http://localhost:8118',
        ]
    );
    var_dump('Result:', $res);

} catch (\Throwable $th) {
    var_dump('Exception:', $th);
}
```

[This file](https://github.com/amirrh6/litegram/blob/main/examples/example.php) provides usage example for some primary methods.

History
-------

[](#history)

Over a year ago, during my free time between university classes, I started working on another Telegram bot. I wanted to challenge myself by creating my own wrapper library for it. Although the bot project was eventually abandoned, I decided to revive the wrapper library, and here we are today.

License:
--------

[](#license)

[GPL 2.0 only](https://spdx.org/licenses/gpl-2.0-only.html)

Classes and methods:
--------------------

[](#classes-and-methods)

\* Make sure you view this section on [Github](https://github.com/amirrh6/litegram?tab=readme-ov-file#implemented-classes-and-methods) rather than Packagist as it doesn't display checkmarks correctly.

### Getting updates

[](#getting-updates)

(4/4 methods implemented, 2/2 classes implemented)

- [Update](https://core.telegram.org/bots/api#update)
- [getUpdates](https://core.telegram.org/bots/api#getupdates)
- [setWebhook](https://core.telegram.org/bots/api#setwebhook)
- [deleteWebhook](https://core.telegram.org/bots/api#deletewebhook)
- [getWebhookInfo](https://core.telegram.org/bots/api#getwebhookinfo)
- [WebhookInfo](https://core.telegram.org/bots/api#webhookinfo)

### Available types

[](#available-types)

(71/150 classes implemented)

- [User](https://core.telegram.org/bots/api#user)
- - `_get_full_name()` helper method is provided by Litegram
- [Chat](https://core.telegram.org/bots/api#chat)
- [ChatFullInfo](https://core.telegram.org/bots/api#chatfullinfo)
- [Message](https://core.telegram.org/bots/api#message)
- [MessageId](https://core.telegram.org/bots/api#messageid)
- [InaccessibleMessage](https://core.telegram.org/bots/api#inaccessiblemessage)
- [MaybeInaccessibleMessage](https://core.telegram.org/bots/api#maybeinaccessiblemessage) : InaccessibleMessage | Message
- [MessageEntity](https://core.telegram.org/bots/api#messageentity)
- [TextQuote](https://core.telegram.org/bots/api#textquote)
- [ExternalReplyInfo](https://core.telegram.org/bots/api#externalreplyinfo)
- [ReplyParameters](https://core.telegram.org/bots/api#replyparameters)
- [MessageOrigin](https://core.telegram.org/bots/api##messageorigin)
- - [MessageOriginUser](https://core.telegram.org/bots/api#messageoriginuser)
- - [MessageOriginHiddenUser](https://core.telegram.org/bots/api#messageoriginhiddenuser)
- - [MessageOriginChat](https://core.telegram.org/bots/api#messageoriginchat)
- - [MessageOriginChannel](https://core.telegram.org/bots/api#messageoriginchannel)
- [PhotoSize](https://core.telegram.org/bots/api#photosize)
- [Animation](https://core.telegram.org/bots/api#animation)
- [Audio](https://core.telegram.org/bots/api#audio)
- [Document](https://core.telegram.org/bots/api#document)
- [Story](https://core.telegram.org/bots/api#story)
- [Video](https://core.telegram.org/bots/api#video)
- [VideoNote](https://core.telegram.org/bots/api#videonote)
- [Voice](https://core.telegram.org/bots/api#voice)
- [PaidMediaInfo](https://core.telegram.org/bots/api#paidmediainfo)
- [PaidMedia](https://core.telegram.org/bots/api#paidmedia)
- - [PaidMediaPreview](https://core.telegram.org/bots/api#paidmediapreview)
- - [PaidMediaPhoto](https://core.telegram.org/bots/api#paidmediaphoto)
- - [PaidMediaVideo](https://core.telegram.org/bots/api#paidmediavideo)
- [Contact](https://core.telegram.org/bots/api#contact)
- [Dice](https://core.telegram.org/bots/api#dice)
- [PollOption](https://core.telegram.org/bots/api#polloption)
- [InputPollOption](https://core.telegram.org/bots/api#inputpolloption)
- [PollAnswer](https://core.telegram.org/bots/api#pollanswer)
- [Poll](https://core.telegram.org/bots/api#poll)
- [Location](https://core.telegram.org/bots/api#location)
- [Venue](https://core.telegram.org/bots/api#venue)
- [WebAppData](https://core.telegram.org/bots/api#webappdata)
- [ProximityAlertTriggered](https://core.telegram.org/bots/api#proximityalerttriggered)
- [MessageAutoDeleteTimerChanged](https://core.telegram.org/bots/api#messageautodeletetimerchanged)
- [ChatBoostAdded](https://core.telegram.org/bots/api#chatboostadded)
- [BackgroundFill](https://core.telegram.org/bots/api#backgroundfill)
- [BackgroundFillSolid](https://core.telegram.org/bots/api#backgroundfillsolid)
- [BackgroundFillGradient](https://core.telegram.org/bots/api#backgroundfillgradient)
- [BackgroundFillFreeformGradient](https://core.telegram.org/bots/api#backgroundfillfreeformgradient)
- [BackgroundType](https://core.telegram.org/bots/api#backgroundtype)
- [BackgroundTypeFill](https://core.telegram.org/bots/api#backgroundtypefill)
- [BackgroundTypeWallpaper](https://core.telegram.org/bots/api#backgroundtypewallpaper)
- [BackgroundTypePattern](https://core.telegram.org/bots/api#backgroundtypepattern)
- [BackgroundTypeChatTheme](https://core.telegram.org/bots/api#backgroundtypechattheme)
- [ChatBackground](https://core.telegram.org/bots/api#chatbackground)
- [ForumTopicCreated](https://core.telegram.org/bots/api#forumtopiccreated)
- [ForumTopicClosed](https://core.telegram.org/bots/api#forumtopicclosed)
- [ForumTopicEdited](https://core.telegram.org/bots/api#forumtopicedited)
- [ForumTopicReopened](https://core.telegram.org/bots/api#forumtopicreopened)
- [GeneralForumTopicHidden](https://core.telegram.org/bots/api#generalforumtopichidden)
- [GeneralForumTopicUnhidden](https://core.telegram.org/bots/api#generalforumtopicunhidden)
- [SharedUser](https://core.telegram.org/bots/api#shareduser)
- [UsersShared](https://core.telegram.org/bots/api#usersshared)
- [ChatShared](https://core.telegram.org/bots/api#chatshared)
- [WriteAccessAllowed](https://core.telegram.org/bots/api#writeaccessallowed)
- [VideoChatScheduled](https://core.telegram.org/bots/api#videochatscheduled)
- [VideoChatStarted](https://core.telegram.org/bots/api#videochatstarted)
- [VideoChatEnded](https://core.telegram.org/bots/api#videochatended)
- [VideoChatParticipantsInvited](https://core.telegram.org/bots/api#videochatparticipantsinvited)
- [GiveawayCreated](https://core.telegram.org/bots/api#giveawaycreated)
- [Giveaway](https://core.telegram.org/bots/api#giveaway)
- [GiveawayWinners](https://core.telegram.org/bots/api#giveawaywinners)
- [GiveawayCompleted](https://core.telegram.org/bots/api#giveawaycompleted)
- [LinkPreviewOptions](https://core.telegram.org/bots/api#linkpreviewoptions)
- [UserProfilePhotos](https://core.telegram.org/bots/api#userprofilephotos)
- [File](https://core.telegram.org/bots/api#file)
- [WebAppInfo](https://core.telegram.org/bots/api#webappinfo)
- [ReplyKeyboardMarkup](https://core.telegram.org/bots/api#replykeyboardmarkup)
- [KeyboardButton](https://core.telegram.org/bots/api#keyboardbutton)
- [KeyboardButtonRequestUsers](https://core.telegram.org/bots/api#keyboardbuttonrequestusers)
- [KeyboardButtonRequestChat](https://core.telegram.org/bots/api#keyboardbuttonrequestchat)
- [KeyboardButtonPollType](https://core.telegram.org/bots/api#keyboardbuttonpolltype)
- [ReplyKeyboardRemove](https://core.telegram.org/bots/api#replykeyboardremove)
- [InlineKeyboardMarkup](https://core.telegram.org/bots/api#inlinekeyboardmarkup)
- [InlineKeyboardButton](https://core.telegram.org/bots/api#inlinekeyboardbutton)
- [LoginUrl](https://core.telegram.org/bots/api#loginurl)
- [SwitchInlineQueryChosenChat](https://core.telegram.org/bots/api#switchinlinequerychosenchat)
- [CopyTextButton](https://core.telegram.org/bots/api#copytextbutton)
- [CallbackQuery](https://core.telegram.org/bots/api#callbackquery)
- [ForceReply](https://core.telegram.org/bots/api#forcereply)
- [ChatPhoto](https://core.telegram.org/bots/api#chatphoto)
- [ChatInviteLink](https://core.telegram.org/bots/api#chatinvitelink)
- [ChatAdministratorRights](https://core.telegram.org/bots/api#chatadministratorrights)
- [ChatMemberUpdated](https://core.telegram.org/bots/api#chatmemberupdated)
- [ChatMember](https://core.telegram.org/bots/api#chatmember)
- - [ChatMemberOwner](https://core.telegram.org/bots/api#chatmemberowner)
- - [ChatMemberAdministrator](https://core.telegram.org/bots/api#chatmemberadministrator)
- - [ChatMemberMember](https://core.telegram.org/bots/api#chatmembermember)
- - [ChatMemberRestricted](https://core.telegram.org/bots/api#chatmemberrestricted)
- - [ChatMemberLeft](https://core.telegram.org/bots/api#chatmemberleft)
- - [ChatMemberBanned](https://core.telegram.org/bots/api#chatmemberbanned)
- [ChatJoinRequest](https://core.telegram.org/bots/api#chatjoinrequest)
- [ChatPermissions](https://core.telegram.org/bots/api#chatpermissions)
- [Birthdate](https://core.telegram.org/bots/api#birthdate)
- [BusinessIntro](https://core.telegram.org/bots/api#businessintro)
- [BusinessLocation](https://core.telegram.org/bots/api#businesslocation)
- [BusinessOpeningHoursInterval](https://core.telegram.org/bots/api#businessopeninghoursinterval)
- [BusinessOpeningHours](https://core.telegram.org/bots/api#businessopeninghours)
- [ChatLocation](https://core.telegram.org/bots/api#chatlocation)
- [ReactionType](https://core.telegram.org/bots/api#reactiontype)
- - [ReactionTypeEmoji](https://core.telegram.org/bots/api#reactiontypeemoji)
- - [ReactionTypeCustomEmoji](https://core.telegram.org/bots/api#reactiontypecustomemoji)
- - [ReactionTypePaid](https://core.telegram.org/bots/api#reactiontypepaid)
- [ReactionCount](https://core.telegram.org/bots/api#reactioncount)
- [MessageReactionUpdated](https://core.telegram.org/bots/api#messagereactionupdated)
- [MessageReactionCountUpdated](https://core.telegram.org/bots/api#messagereactioncountupdated)
- [ForumTopic](https://core.telegram.org/bots/api#forumtopic)
- [BotCommand](https://core.telegram.org/bots/api#botcommand)
- [BotCommandScope](https://core.telegram.org/bots/api#botcommandscope)
- - [BotCommandScopeDefault](https://core.telegram.org/bots/api#botcommandscopedefault)
- - [BotCommandScopeAllPrivateChats](https://core.telegram.org/bots/api#botcommandscopeallprivatechats)
- - [BotCommandScopeAllGroupChats](https://core.telegram.org/bots/api#botcommandscopeallgroupchats)
- - [BotCommandScopeAllChatAdministrators](https://core.telegram.org/bots/api#botcommandscopeallchatadministrators)
- - [BotCommandScopeChat](https://core.telegram.org/bots/api#botcommandscopechat)
- - [BotCommandScopeChatAdministrators](https://core.telegram.org/bots/api#botcommandscopechatadministrators)
- - [BotCommandScopeChatMember](https://core.telegram.org/bots/api#botcommandscopechatmember)
- [BotName](https://core.telegram.org/bots/api#botname)
- [BotDescription](https://core.telegram.org/bots/api#botdescription)
- [BotShortDescription](https://core.telegram.org/bots/api#botshortdescription)
- [MenuButton](https://core.telegram.org/bots/api#menubutton)
- - [MenuButtonCommands](https://core.telegram.org/bots/api#menubuttoncommands)
- - [MenuButtonWebApp](https://core.telegram.org/bots/api#menubuttonwebapp)
- - [MenuButtonDefault](https://core.telegram.org/bots/api#menubuttondefault)
- [ChatBoostSource](https://core.telegram.org/bots/api#chatboostsource)
- - [ChatBoostSourcePremium](https://core.telegram.org/bots/api#chatboostsourcepremium)
- - [ChatBoostSourceGiftCode](https://core.telegram.org/bots/api#chatboostsourcegiftcode)
- - [ChatBoostSourceGiveaway](https://core.telegram.org/bots/api#chatboostsourcegiveaway)
- [ChatBoost](https://core.telegram.org/bots/api#chatboost)
- [ChatBoostUpdated](https://core.telegram.org/bots/api#chatboostupdated)
- [ChatBoostRemoved](https://core.telegram.org/bots/api#chatboostremoved)
- [UserChatBoosts](https://core.telegram.org/bots/api#userchatboosts)
- [BusinessConnection](https://core.telegram.org/bots/api#businessconnection)
- [BusinessMessagesDeleted](https://core.telegram.org/bots/api#businessmessagesdeleted)
- [ResponseParameters](https://core.telegram.org/bots/api#responseparameters)
- [InputMedia](https://core.telegram.org/bots/api#inputmedia)
- - [InputMediaPhoto](https://core.telegram.org/bots/api#inputmediaphoto)
- - [InputMediaVideo](https://core.telegram.org/bots/api#inputmediavideo)
- - [InputMediaAnimation](https://core.telegram.org/bots/api#inputmediaanimation)
- - [InputMediaAudio](https://core.telegram.org/bots/api#inputmediaaudio)
- - [InputMediaDocument](https://core.telegram.org/bots/api#inputmediadocument)
- [InputFile](https://core.telegram.org/bots/api#inputfile)
- [InputPaidMedia](https://core.telegram.org/bots/api#inputpaidmedia)
- - [InputPaidMediaPhoto](https://core.telegram.org/bots/api#inputpaidmediaphoto)
- - [InputPaidMediaVideo](https://core.telegram.org/bots/api#inputpaidmediavideo)

### Available methods

[](#available-methods)

(11/85 methods implemented)

\* Every method here has a signature **similar** to:

```
static function sendMessage(
    string $token,
    SendMessageParams $params,
    $guzzle_options = []
): Message
```

See [here](#usage-and-examples) for usage and examples.

- [getMe](https://core.telegram.org/bots/api#getme)
- [logOut](https://core.telegram.org/bots/api#logout)
- [close](https://core.telegram.org/bots/api#close)
- [sendMessage](https://core.telegram.org/bots/api#sendmessage)
- [forwardMessage](https://core.telegram.org/bots/api#forwardmessage)
- [forwardMessages](https://core.telegram.org/bots/api#forwardmessages)
- [copyMessage](https://core.telegram.org/bots/api#copymessage) \*
- [copyMessages](https://core.telegram.org/bots/api#copymessages)
- [sendPhoto](https://core.telegram.org/bots/api#sendphoto)
- [sendAudio](https://core.telegram.org/bots/api#sendaudio)
- [sendDocument](https://core.telegram.org/bots/api#senddocument)
- [sendVideo](https://core.telegram.org/bots/api#sendvideo)
- [sendAnimation](https://core.telegram.org/bots/api#sendanimation)
- [sendVoice](https://core.telegram.org/bots/api#sendvoice)
- [sendVideoNote](https://core.telegram.org/bots/api#sendvideonote)
- [sendPaidMedia](https://core.telegram.org/bots/api#sendpaidmedia)
- [sendMediaGroup](https://core.telegram.org/bots/api#sendmediagroup)
- [sendLocation](https://core.telegram.org/bots/api#sendlocation)
- [sendVenue](https://core.telegram.org/bots/api#sendvenue)
- [sendContact](https://core.telegram.org/bots/api#sendcontact)
- [sendPoll](https://core.telegram.org/bots/api#sendpoll)
- [sendDice](https://core.telegram.org/bots/api#senddice)
- [sendChatAction](https://core.telegram.org/bots/api#sendchataction)
- [setMessageReaction](https://core.telegram.org/bots/api#setmessagereaction)
- [getUserProfilePhotos](https://core.telegram.org/bots/api#getuserprofilephotos)
- [getFile](https://core.telegram.org/bots/api#getfile)
- [banChatMember](https://core.telegram.org/bots/api#banchatmember)
- [unbanChatMember](https://core.telegram.org/bots/api#unbanchatmember)
- [restrictChatMember](https://core.telegram.org/bots/api#restrictchatmember)
- [promoteChatMember](https://core.telegram.org/bots/api#promotechatmember)
- [setChatAdministratorCustomTitle](https://core.telegram.org/bots/api#setchatadministratorcustomtitle)
- [banChatSenderChat](https://core.telegram.org/bots/api#banchatsenderchat)
- [unbanChatSenderChat](https://core.telegram.org/bots/api#unbanchatsenderchat)
- [setChatPermissions](https://core.telegram.org/bots/api#setchatpermissions)
- [exportChatInviteLink](https://core.telegram.org/bots/api#exportchatinvitelink)
- [createChatInviteLink](https://core.telegram.org/bots/api#createchatinvitelink)
- [editChatInviteLink](https://core.telegram.org/bots/api#editchatinvitelink)
- [createChatSubscriptionInviteLink](https://core.telegram.org/bots/api#createchatsubscriptioninvitelink)
- [editChatSubscriptionInviteLink](https://core.telegram.org/bots/api#editchatsubscriptioninvitelink)
- [revokeChatInviteLink](https://core.telegram.org/bots/api#revokechatinvitelink)
- [approveChatJoinRequest](https://core.telegram.org/bots/api#approvechatjoinrequest)
- [declineChatJoinRequest](https://core.telegram.org/bots/api#declinechatjoinrequest)
- [setChatPhoto](https://core.telegram.org/bots/api#setchatphoto)
- [deleteChatPhoto](https://core.telegram.org/bots/api#deletechatphoto)
- [setChatTitle](https://core.telegram.org/bots/api#setchattitle)
- [setChatDescription](https://core.telegram.org/bots/api#setchatdescription)
- [pinChatMessage](https://core.telegram.org/bots/api#pinchatmessage)
- [unpinChatMessage](https://core.telegram.org/bots/api#unpinchatmessage)
- [unpinAllChatMessages](https://core.telegram.org/bots/api#unpinallchatmessages)
- [leaveChat](https://core.telegram.org/bots/api#leavechat)
- [getChat](https://core.telegram.org/bots/api#getchat)
- [getChatAdministrators](https://core.telegram.org/bots/api#getchatadministrators)
- [getChatMemberCount](https://core.telegram.org/bots/api#getchatmembercount)
- [getChatMember](https://core.telegram.org/bots/api#getchatmember)
- [setChatStickerSet](https://core.telegram.org/bots/api#setchatstickerset)
- [deleteChatStickerSet](https://core.telegram.org/bots/api#deletechatstickerset)
- [getForumTopicIconStickers](https://core.telegram.org/bots/api#getforumtopiciconstickers)
- [createForumTopic](https://core.telegram.org/bots/api#createforumtopic)
- [editForumTopic](https://core.telegram.org/bots/api#editforumtopic)
- [closeForumTopic](https://core.telegram.org/bots/api#closeforumtopic)
- [reopenForumTopic](https://core.telegram.org/bots/api#reopenforumtopic)
- [deleteForumTopic](https://core.telegram.org/bots/api#deleteforumtopic)
- [unpinAllForumTopicMessages](https://core.telegram.org/bots/api#unpinallforumtopicmessages)
- [editGeneralForumTopic](https://core.telegram.org/bots/api#editgeneralforumtopic)
- [closeGeneralForumTopic](https://core.telegram.org/bots/api#closegeneralforumtopic)
- [reopenGeneralForumTopic](https://core.telegram.org/bots/api#reopengeneralforumtopic)
- [hideGeneralForumTopic](https://core.telegram.org/bots/api#hidegeneralforumtopic)
- [unhideGeneralForumTopic](https://core.telegram.org/bots/api#unhidegeneralforumtopic)
- [unpinAllGeneralForumTopicMessages](https://core.telegram.org/bots/api#unpinallgeneralforumtopicmessages)
- [answerCallbackQuery](https://core.telegram.org/bots/api#answercallbackquery)
- [getUserChatBoosts](https://core.telegram.org/bots/api#getuserchatboosts)
- [getBusinessConnection](https://core.telegram.org/bots/api#getbusinessconnection)
- [setMyCommands](https://core.telegram.org/bots/api#setmycommands)
- [deleteMyCommands](https://core.telegram.org/bots/api#deletemycommands)
- [getMyCommands](https://core.telegram.org/bots/api#getmycommands)
- [setMyName](https://core.telegram.org/bots/api#setmyname)
- [getMyName](https://core.telegram.org/bots/api#getmyname)
- [setMyDescription](https://core.telegram.org/bots/api#setmydescription)
- [getMyDescription](https://core.telegram.org/bots/api#getmydescription)
- [setMyShortDescription](https://core.telegram.org/bots/api#setmyshortdescription)
- [getMyShortDescription](https://core.telegram.org/bots/api#getmyshortdescription)
- [setChatMenuButton](https://core.telegram.org/bots/api#setchatmenubutton)
- [getChatMenuButton](https://core.telegram.org/bots/api#getchatmenubutton)
- [setMyDefaultAdministratorRights](https://core.telegram.org/bots/api#setmydefaultadministratorrights)
- [getMyDefaultAdministratorRights](https://core.telegram.org/bots/api#getmydefaultadministratorrights)

\* Experimental bulk (concurrent) version of this method is available. These methods are named like this: `copyMessage()` ---&gt; `_bulkCopyMessage()`

### Updating messages

[](#updating-messages)

(1/9 methods implemented)

- [editMessageText](https://core.telegram.org/bots/api#editmessagetext)
- [editMessageCaption](https://core.telegram.org/bots/api#editmessagecaption)
- [editMessageMedia](https://core.telegram.org/bots/api#editmessagemedia)
- [editMessageLiveLocation](https://core.telegram.org/bots/api#editmessagelivelocation)
- [stopMessageLiveLocation](https://core.telegram.org/bots/api#stopmessagelivelocation)
- [editMessageReplyMarkup](https://core.telegram.org/bots/api#editmessagereplymarkup)
- [stopPoll](https://core.telegram.org/bots/api#stoppoll)
- [deleteMessage](https://core.telegram.org/bots/api#deletemessage)
- [deleteMessages](https://core.telegram.org/bots/api#deletemessages)

### Stickers

[](#stickers)

(0/16 methods implemented, 0/4 classes implemented)

- [Sticker](https://core.telegram.org/bots/api#sticker)
- [StickerSet](https://core.telegram.org/bots/api#stickerset)
- [MaskPosition](https://core.telegram.org/bots/api#maskposition)
- [InputSticker](https://core.telegram.org/bots/api#inputsticker)
- [sendSticker](https://core.telegram.org/bots/api#sendsticker)
- [getStickerSet](https://core.telegram.org/bots/api#getstickerset)
- [getCustomEmojiStickers](https://core.telegram.org/bots/api#getcustomemojistickers)
- [uploadStickerFile](https://core.telegram.org/bots/api#uploadstickerfile)
- [createNewStickerSet](https://core.telegram.org/bots/api#createnewstickerset)
- [addStickerToSet](https://core.telegram.org/bots/api#addstickertoset)
- [setStickerPositionInSet](https://core.telegram.org/bots/api#setstickerpositioninset)
- [deleteStickerFromSet](https://core.telegram.org/bots/api#deletestickerfromset)
- [replaceStickerInSet](https://core.telegram.org/bots/api#replacestickerinset)
- [setStickerEmojiList](https://core.telegram.org/bots/api#setstickeremojilist)
- [setStickerKeywords](https://core.telegram.org/bots/api#setstickerkeywords)
- [setStickerMaskPosition](https://core.telegram.org/bots/api#setstickermaskposition)
- [setStickerSetTitle](https://core.telegram.org/bots/api#setstickersettitle)
- [setStickerSetThumbnail](https://core.telegram.org/bots/api#setstickersetthumbnail)
- [setCustomEmojiStickerSetThumbnail](https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail)
- [deleteStickerSet](https://core.telegram.org/bots/api#deletestickerset)

### Inline mode

[](#inline-mode)

(0/2 methods implemented, 3/29 classes implemented + 2 union types)

- [InlineQuery](https://core.telegram.org/bots/api#inlinequery)
- [answerInlineQuery](https://core.telegram.org/bots/api#answerinlinequery)
- [InlineQueryResultsButton](https://core.telegram.org/bots/api#inlinequeryresultsbutton)
- [InlineQueryResult](https://core.telegram.org/bots/api#inlinequeryresult)
- - [InlineQueryResultArticle](https://core.telegram.org/bots/api#inlinequeryresultarticle)
- - [InlineQueryResultPhoto](https://core.telegram.org/bots/api#inlinequeryresultphoto)
- - [InlineQueryResultGif](https://core.telegram.org/bots/api#inlinequeryresultgif)
- - [InlineQueryResultMpeg4Gif](https://core.telegram.org/bots/api#inlinequeryresultmpeg4gif)
- - [InlineQueryResultVideo](https://core.telegram.org/bots/api#inlinequeryresultvideo)
- - [InlineQueryResultAudio](https://core.telegram.org/bots/api#inlinequeryresultaudio)
- - [InlineQueryResultVoice](https://core.telegram.org/bots/api#inlinequeryresultvoice)
- - [InlineQueryResultDocument](https://core.telegram.org/bots/api#inlinequeryresultdocument)
- - [InlineQueryResultLocation](https://core.telegram.org/bots/api#inlinequeryresultlocation)
- - [InlineQueryResultVenue](https://core.telegram.org/bots/api#inlinequeryresultvenue)
- - [InlineQueryResultContact](https://core.telegram.org/bots/api#inlinequeryresultcontact)
- - [InlineQueryResultGame](https://core.telegram.org/bots/api#inlinequeryresultgame)
- - [InlineQueryResultCachedPhoto](https://core.telegram.org/bots/api#inlinequeryresultcachedphoto)
- - [InlineQueryResultCachedGif](https://core.telegram.org/bots/api#inlinequeryresultcachedgif)
- - [InlineQueryResultCachedMpeg4Gif](https://core.telegram.org/bots/api#inlinequeryresultcachedmpeg4gif)
- - [InlineQueryResultCachedSticker](https://core.telegram.org/bots/api#inlinequeryresultcachedsticker)
- - [InlineQueryResultCachedDocument](https://core.telegram.org/bots/api#inlinequeryresultcacheddocument)
- - [InlineQueryResultCachedVideo](https://core.telegram.org/bots/api#inlinequeryresultcachedvideo)
- - [InlineQueryResultCachedVoice](https://core.telegram.org/bots/api#inlinequeryresultcachedvoice)
- - [InlineQueryResultCachedAudio](https://core.telegram.org/bots/api#inlinequeryresultcachedaudio)
- [InputMessageContent](https://core.telegram.org/bots/api#inputmessagecontent)
- - [InputTextMessageContent](https://core.telegram.org/bots/api#inputtextmessagecontent)
- - [InputLocationMessageContent](https://core.telegram.org/bots/api#inputlocationmessagecontent)
- - [InputVenueMessageContent](https://core.telegram.org/bots/api#inputvenuemessagecontent)
- - [InputContactMessageContent](https://core.telegram.org/bots/api#inputcontactmessagecontent)
- - [InputInvoiceMessageContent](https://core.telegram.org/bots/api#inputinvoicemessagecontent)
- [ChosenInlineResult](https://core.telegram.org/bots/api#choseninlineresult)
- [answerWebAppQuery](https://core.telegram.org/bots/api#answerwebappquery)
- [SentWebAppMessage](https://core.telegram.org/bots/api#sentwebappmessage)

### Payments

[](#payments)

(0/6 methods implemented, 3/19 classes implemented + 2 union types)

- [sendInvoice](https://core.telegram.org/bots/api#sendinvoice)
- [createInvoiceLink](https://core.telegram.org/bots/api#createinvoicelink)
- [answerShippingQuery](https://core.telegram.org/bots/api#answershippingquery)
- [answerPreCheckoutQuery](https://core.telegram.org/bots/api#answerprecheckoutquery)
- [getStarTransactions](https://core.telegram.org/bots/api#getstartransactions)
- [refundStarPayment](https://core.telegram.org/bots/api#refundstarpayment)
- [LabeledPrice](https://core.telegram.org/bots/api#labeledprice)
- [Invoice](https://core.telegram.org/bots/api#invoice)
- [ShippingAddress](https://core.telegram.org/bots/api#shippingaddress)
- [OrderInfo](https://core.telegram.org/bots/api#orderinfo)
- [ShippingOption](https://core.telegram.org/bots/api#shippingoption)
- [SuccessfulPayment](https://core.telegram.org/bots/api#successfulpayment)
- [RefundedPayment](https://core.telegram.org/bots/api#refundedpayment)
- [ShippingQuery](https://core.telegram.org/bots/api#shippingquery)
- [PreCheckoutQuery](https://core.telegram.org/bots/api#precheckoutquery)
- [PaidMediaPurchased](https://core.telegram.org/bots/api#paidmediapurchased)
- [RevenueWithdrawalState](https://core.telegram.org/bots/api#revenuewithdrawalstate)
- - [RevenueWithdrawalStatePending](https://core.telegram.org/bots/api#revenuewithdrawalstatepending)
- - [RevenueWithdrawalStateSucceeded](https://core.telegram.org/bots/api#revenuewithdrawalstatesucceeded)
- - [RevenueWithdrawalStateFailed](https://core.telegram.org/bots/api#revenuewithdrawalstatefailed)
- [TransactionPartner](https://core.telegram.org/bots/api#transactionpartner)
- - [TransactionPartnerUser](https://core.telegram.org/bots/api#transactionpartneruser)
- - [TransactionPartnerFragment](https://core.telegram.org/bots/api#transactionpartnerfragment)
- - [TransactionPartnerTelegramAds](https://core.telegram.org/bots/api#transactionpartnertelegramads)
- - [TransactionPartnerTelegramApi](https://core.telegram.org/bots/api#transactionpartnertelegramapi)
- - [TransactionPartnerOther](https://core.telegram.org/bots/api#transactionpartnerother)
- [StarTransaction](https://core.telegram.org/bots/api#startransaction)
- [StarTransactions](https://core.telegram.org/bots/api#startransactions)

### Telegram Passport

[](#telegram-passport)

(0/1 methods implemented, 0/13 classes implemented + 1 union type)

- [PassportData](https://core.telegram.org/bots/api#passportdata)
- [PassportFile](https://core.telegram.org/bots/api#passportfile)
- [EncryptedPassportElement](https://core.telegram.org/bots/api#encryptedpassportelement)
- [EncryptedCredentials](https://core.telegram.org/bots/api#encryptedcredentials)
- [setPassportDataErrors](https://core.telegram.org/bots/api#setpassportdataerrors)
- [PassportElementError](https://core.telegram.org/bots/api#passportelementerror)
- - [PassportElementErrorDataField](https://core.telegram.org/bots/api#passportelementerrordatafield)
- - [PassportElementErrorFrontSide](https://core.telegram.org/bots/api#passportelementerrorfrontside)
- - [PassportElementErrorReverseSide](https://core.telegram.org/bots/api#passportelementerrorreverseside)
- - [PassportElementErrorSelfie](https://core.telegram.org/bots/api#passportelementerrorselfie)
- - [PassportElementErrorFile](https://core.telegram.org/bots/api#passportelementerrorfile)
- - [PassportElementErrorFiles](https://core.telegram.org/bots/api#passportelementerrorfiles)
- - [PassportElementErrorTranslationFile](https://core.telegram.org/bots/api#passportelementerrortranslationfile)
- - [PassportElementErrorTranslationFiles](https://core.telegram.org/bots/api#passportelementerrortranslationfiles)
- - [PassportElementErrorUnspecified](https://core.telegram.org/bots/api#passportelementerrorunspecified)

### Games

[](#games)

(0/3 methods implemented, 0/3 classes implemented)

- [sendGame](https://core.telegram.org/bots/api#sendgame)
- [Game](https://core.telegram.org/bots/api#game)
- [CallbackGame](https://core.telegram.org/bots/api#callbackgame)
- [setGameScore](https://core.telegram.org/bots/api#setgamescore)
- [setGameHighScores](https://core.telegram.org/bots/api#setgamehighscores)
- [GameHighScore](https://core.telegram.org/bots/api#gamehighscore)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance44

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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 ~4 days

Total

28

Last Release

442d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2e619256b680ac58fd29e759fda44602c874d5a36c690c829502d6c59db4ef7f?d=identicon)[amirrh6](/maintainers/amirrh6)

---

Top Contributors

[![amirrh6](https://avatars.githubusercontent.com/u/65363030?v=4)](https://github.com/amirrh6 "amirrh6 (108 commits)")

---

Tags

phpphp-libraryphp8telegramtelegram-apitelegram-bottelegram-bot-api

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/amirrh6-litegram/health.svg)

```
[![Health](https://phpackages.com/badges/amirrh6-litegram/health.svg)](https://phpackages.com/packages/amirrh6-litegram)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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