phpbotgram

Bot
in package
implements BotShortcutsContract uses BotShortcuts

Bot facade.

Provides one wrapper per Telegram API method, plus the hand-coded constructor / __invoke dispatch entry-point preserved from Phase 1.

Table of Contents

Interfaces

BotShortcutsContract

Properties

$defaultProperties  : DefaultBotProperties
$session  : BaseSession
$token  : string
$cachedId  : int|null
$cachedMe  : User|null
$currentBotLocals  : array<class-string, FiberLocal<string|int, Bot|null>>
Per-class FiberLocal slots, keyed by `static::class`. A trait-level `private static ?FiberLocal` would otherwise collapse across the using class hierarchy (Bot + MockedBot would share one slot).

Methods

__construct()  : mixed
__invoke()  : TReturn
Polymorphic entry point: $bot($method) dispatches the method through the session's middleware chain.
addStickerToSet()  : bool
answerCallbackQuery()  : bool
answerChatJoinRequestQuery()  : bool
answerGuestQuery()  : SentGuestMessage
answerInlineQuery()  : bool
answerPreCheckoutQuery()  : bool
answerShippingQuery()  : bool
answerWebAppQuery()  : SentWebAppMessage
approveChatJoinRequest()  : bool
approveSuggestedPost()  : bool
banChatMember()  : bool
banChatSenderChat()  : bool
close()  : bool
closeForumTopic()  : bool
closeGeneralForumTopic()  : bool
context()  : Closure
`($bot->context())(function (Bot $bot) { … })` — the body closure receives `$this` as its single argument so callers can avoid `use ($bot)` clutter.
convertGiftToStars()  : bool
copyMessage()  : MessageId
copyMessages()  : array<int, MessageId>
createChatInviteLink()  : ChatInviteLink
createChatSubscriptionInviteLink()  : ChatInviteLink
createForumTopic()  : ForumTopic
createInvoiceLink()  : string
createNewStickerSet()  : bool
current()  : Bot|null
declineChatJoinRequest()  : bool
declineSuggestedPost()  : bool
deleteAllMessageReactions()  : bool
deleteBusinessMessages()  : bool
deleteChatPhoto()  : bool
deleteChatStickerSet()  : bool
deleteForumTopic()  : bool
deleteMessage()  : bool
deleteMessageReaction()  : bool
deleteMessages()  : bool
deleteMyCommands()  : bool
deleteStickerFromSet()  : bool
deleteStickerSet()  : bool
deleteStory()  : bool
deleteWebhook()  : bool
download()  : string|null
Mirrors aiogram's `bot.download(file: str | Downloadable, ...)`. A bare `string` is treated as a `file_id` and resolved via `getFile` before downloading; a `Downloadable` (Document/Photo/Voice/etc) is unwrapped via its `fileId()` method.
downloadFile()  : string|null
editChatInviteLink()  : ChatInviteLink
editChatSubscriptionInviteLink()  : ChatInviteLink
editForumTopic()  : bool
editGeneralForumTopic()  : bool
editMessageCaption()  : bool|Message
editMessageChecklist()  : Message
editMessageLiveLocation()  : bool|Message
editMessageMedia()  : bool|Message
editMessageReplyMarkup()  : bool|Message
editMessageText()  : bool|Message
editStory()  : Story
editUserStarSubscription()  : bool
exportChatInviteLink()  : string
forwardMessage()  : Message
forwardMessages()  : array<int, MessageId>
getAvailableGifts()  : Gifts
getBusinessAccountGifts()  : OwnedGifts
getBusinessAccountStarBalance()  : StarAmount
getBusinessConnection()  : BusinessConnection
getChat()  : ChatFullInfo
getChatAdministrators()  : array<int, ChatMember>
getChatGifts()  : OwnedGifts
getChatMember()  : ChatMember
getChatMemberCount()  : int
getChatMenuButton()  : MenuButton
getCustomEmojiStickers()  : array<int, Sticker>
getDefaultProperties()  : DefaultBotProperties
getFile()  : File
getForumTopicIconStickers()  : array<int, Sticker>
getGameHighScores()  : array<int, GameHighScore>
getId()  : int
getManagedBotAccessSettings()  : BotAccessSettings
getManagedBotToken()  : string
getMe()  : User
getMyCommands()  : array<int, BotCommand>
getMyDefaultAdministratorRights()  : ChatAdministratorRights
getMyDescription()  : BotDescription
getMyName()  : BotName
getMyShortDescription()  : BotShortDescription
getMyStarBalance()  : StarAmount
getStarTransactions()  : StarTransactions
getStickerSet()  : StickerSet
getUpdates()  : array<int, Update>
Note: $timeout is the long-poll timeout (seconds) carried on the wire to Telegram; $apiTimeout is the HTTP transport timeout for the underlying request.
getUserChatBoosts()  : UserChatBoosts
getUserGifts()  : OwnedGifts
getUserPersonalChatMessages()  : array<int, Message>
getUserProfileAudios()  : UserProfileAudios
getUserProfilePhotos()  : UserProfilePhotos
getWebhookInfo()  : WebhookInfo
giftPremiumSubscription()  : bool
hideGeneralForumTopic()  : bool
leaveChat()  : bool
logOut()  : bool
me()  : User
pinChatMessage()  : bool
postStory()  : Story
promoteChatMember()  : bool
readBusinessMessage()  : bool
refundStarPayment()  : bool
removeBusinessAccountProfilePhoto()  : bool
removeChatVerification()  : bool
removeMyProfilePhoto()  : bool
removeUserVerification()  : bool
reopenForumTopic()  : bool
reopenGeneralForumTopic()  : bool
replaceManagedBotToken()  : string
replaceStickerInSet()  : bool
repostStory()  : Story
restrictChatMember()  : bool
revokeChatInviteLink()  : ChatInviteLink
savePreparedInlineMessage()  : PreparedInlineMessage
savePreparedKeyboardButton()  : PreparedKeyboardButton
sendAnimation()  : Message
sendAudio()  : Message
sendChatAction()  : bool
sendChatJoinRequestWebApp()  : bool
sendChecklist()  : Message
sendContact()  : Message
sendDice()  : Message
sendDocument()  : Message
sendGame()  : Message
sendGift()  : bool
sendInvoice()  : Message
sendLivePhoto()  : Message
sendLocation()  : Message
sendMediaGroup()  : array<int, Message>
sendMessage()  : Message
sendMessageDraft()  : bool
sendPaidMedia()  : Message
sendPhoto()  : Message
sendPoll()  : Message
sendRichMessage()  : Message
sendRichMessageDraft()  : bool
sendSticker()  : Message
sendVenue()  : Message
sendVideo()  : Message
sendVideoNote()  : Message
sendVoice()  : Message
setBusinessAccountBio()  : bool
setBusinessAccountGiftSettings()  : bool
setBusinessAccountName()  : bool
setBusinessAccountProfilePhoto()  : bool
setBusinessAccountUsername()  : bool
setChatAdministratorCustomTitle()  : bool
setChatDescription()  : bool
setChatMemberTag()  : bool
setChatMenuButton()  : bool
setChatPermissions()  : bool
setChatPhoto()  : bool
setChatStickerSet()  : bool
setChatTitle()  : bool
setCurrent()  : void
setCustomEmojiStickerSetThumbnail()  : bool
setGameScore()  : bool|Message
setManagedBotAccessSettings()  : bool
setMessageReaction()  : bool
setMyCommands()  : bool
setMyDefaultAdministratorRights()  : bool
setMyDescription()  : bool
setMyName()  : bool
setMyProfilePhoto()  : bool
setMyShortDescription()  : bool
setPassportDataErrors()  : bool
setStickerEmojiList()  : bool
setStickerKeywords()  : bool
setStickerMaskPosition()  : bool
setStickerPositionInSet()  : bool
setStickerSetThumbnail()  : bool
setStickerSetTitle()  : bool
setUserEmojiStatus()  : bool
setWebhook()  : bool
stopMessageLiveLocation()  : bool|Message
stopPoll()  : Poll
transferBusinessAccountStars()  : bool
transferGift()  : bool
unbanChatMember()  : bool
unbanChatSenderChat()  : bool
unhideGeneralForumTopic()  : bool
unpinAllChatMessages()  : bool
unpinAllForumTopicMessages()  : bool
unpinAllGeneralForumTopicMessages()  : bool
unpinChatMessage()  : bool
upgradeGift()  : bool
uploadStickerFile()  : File
verifyChat()  : bool
verifyUser()  : bool
botLocal()  : FiberLocal<string|int, Bot|null>
consumeStream()  : string|null
makeBotLocal()  : FiberLocal<string|int, Bot|null>

Properties

$token read-only

public string $token

$currentBotLocals

Per-class FiberLocal slots, keyed by `static::class`. A trait-level `private static ?FiberLocal` would otherwise collapse across the using class hierarchy (Bot + MockedBot would share one slot).

private static array<class-string, FiberLocal<string|int, Bot|null>> $currentBotLocals = []

Methods

__invoke()

Polymorphic entry point: $bot($method) dispatches the method through the session's middleware chain.

public __invoke(TelegramMethod<string|int, TReturn$method[, int|null $timeout = null ]) : TReturn
Parameters
$method : TelegramMethod<string|int, TReturn>
$timeout : int|null = null
Tags
template
Return values
TReturn

addStickerToSet()

public addStickerToSet(int $userId, string $name, InputSticker $sticker[, int|null $timeout = null ]) : bool
Parameters
$userId : int
$name : string
$sticker : InputSticker
$timeout : int|null = null
Return values
bool

answerCallbackQuery()

public answerCallbackQuery(string $callbackQueryId[, string|null $text = null ][, bool|null $showAlert = null ][, string|null $url = null ][, int|null $cacheTime = null ][, int|null $timeout = null ]) : bool
Parameters
$callbackQueryId : string
$text : string|null = null
$showAlert : bool|null = null
$url : string|null = null
$cacheTime : int|null = null
$timeout : int|null = null
Return values
bool

answerChatJoinRequestQuery()

public answerChatJoinRequestQuery(string $chatJoinRequestQueryId, string $result[, int|null $timeout = null ]) : bool
Parameters
$chatJoinRequestQueryId : string
$result : string
$timeout : int|null = null
Return values
bool

answerInlineQuery()

public answerInlineQuery(string $inlineQueryId, array<int, InlineQueryResult$results[, int|null $cacheTime = null ][, bool|null $isPersonal = null ][, string|null $nextOffset = null ][, InlineQueryResultsButton|null $button = null ][, int|null $timeout = null ]) : bool
Parameters
$inlineQueryId : string
$results : array<int, InlineQueryResult>
$cacheTime : int|null = null
$isPersonal : bool|null = null
$nextOffset : string|null = null
$button : InlineQueryResultsButton|null = null
$timeout : int|null = null
Return values
bool

answerPreCheckoutQuery()

public answerPreCheckoutQuery(string $preCheckoutQueryId, bool $ok[, string|null $errorMessage = null ][, int|null $timeout = null ]) : bool
Parameters
$preCheckoutQueryId : string
$ok : bool
$errorMessage : string|null = null
$timeout : int|null = null
Return values
bool

answerShippingQuery()

public answerShippingQuery(string $shippingQueryId, bool $ok[, null|array<int, ShippingOption$shippingOptions = null ][, string|null $errorMessage = null ][, int|null $timeout = null ]) : bool
Parameters
$shippingQueryId : string
$ok : bool
$shippingOptions : null|array<int, ShippingOption> = null
$errorMessage : string|null = null
$timeout : int|null = null
Return values
bool

approveChatJoinRequest()

public approveChatJoinRequest(int|string $chatId, int $userId[, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$userId : int
$timeout : int|null = null
Return values
bool

approveSuggestedPost()

public approveSuggestedPost(int $chatId, int $messageId[, DateInterval|DateTime|int|null $sendDate = null ][, int|null $timeout = null ]) : bool
Parameters
$chatId : int
$messageId : int
$sendDate : DateInterval|DateTime|int|null = null
$timeout : int|null = null
Return values
bool

banChatMember()

public banChatMember(int|string $chatId, int $userId[, DateInterval|DateTime|int|null $untilDate = null ][, bool|null $revokeMessages = null ][, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$userId : int
$untilDate : DateInterval|DateTime|int|null = null
$revokeMessages : bool|null = null
$timeout : int|null = null
Return values
bool

banChatSenderChat()

public banChatSenderChat(int|string $chatId, int $senderChatId[, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$senderChatId : int
$timeout : int|null = null
Return values
bool

close()

public close([int|null $timeout = null ]) : bool
Parameters
$timeout : int|null = null
Return values
bool

closeForumTopic()

public closeForumTopic(int|string $chatId, int $messageThreadId[, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$messageThreadId : int
$timeout : int|null = null
Return values
bool

closeGeneralForumTopic()

public closeGeneralForumTopic(int|string $chatId[, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$timeout : int|null = null
Return values
bool

context()

`($bot->context())(function (Bot $bot) { … })` — the body closure receives `$this` as its single argument so callers can avoid `use ($bot)` clutter.

public context([bool $autoClose = true ]) : Closure

Mirrors upstream's async with bot.context() as bot: binding.

Parameters
$autoClose : bool = true
Return values
Closure

convertGiftToStars()

public convertGiftToStars(string $businessConnectionId, string $ownedGiftId[, int|null $timeout = null ]) : bool
Parameters
$businessConnectionId : string
$ownedGiftId : string
$timeout : int|null = null
Return values
bool

copyMessage()

public copyMessage(int|string $chatId, int|string $fromChatId, int $messageId[, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, DateInterval|DateTime|int|null $videoStartTimestamp = null ][, string|null $caption = null ][, BotDefault|string|null $parseMode = new BotDefault('parse_mode') ][, null|array<int, MessageEntity$captionEntities = null ][, bool|BotDefault|null $showCaptionAboveMedia = new BotDefault('show_caption_above_media') ][, bool|null $disableNotification = null ][, bool|BotDefault|null $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ReplyParameters|null $replyParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ][, int|null $timeout = null ]) : MessageId
Parameters
$chatId : int|string
$fromChatId : int|string
$messageId : int
$messageThreadId : int|null = null
$directMessagesTopicId : int|null = null
$videoStartTimestamp : DateInterval|DateTime|int|null = null
$caption : string|null = null
$parseMode : BotDefault|string|null = new BotDefault('parse_mode')
$captionEntities : null|array<int, MessageEntity> = null
$showCaptionAboveMedia : bool|BotDefault|null = new BotDefault('show_caption_above_media')
$disableNotification : bool|null = null
$protectContent : bool|BotDefault|null = new BotDefault('protect_content')
$allowPaidBroadcast : bool|null = null
$messageEffectId : string|null = null
$suggestedPostParameters : SuggestedPostParameters|null = null
$replyParameters : ReplyParameters|null = null
$replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
$timeout : int|null = null
Return values
MessageId

copyMessages()

public copyMessages(int|string $chatId, int|string $fromChatId, array<int, int> $messageIds[, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, bool|null $disableNotification = null ][, bool|null $protectContent = null ][, bool|null $removeCaption = null ][, int|null $timeout = null ]) : array<int, MessageId>
Parameters
$chatId : int|string
$fromChatId : int|string
$messageIds : array<int, int>
$messageThreadId : int|null = null
$directMessagesTopicId : int|null = null
$disableNotification : bool|null = null
$protectContent : bool|null = null
$removeCaption : bool|null = null
$timeout : int|null = null
Return values
array<int, MessageId>
public createChatInviteLink(int|string $chatId[, string|null $name = null ][, DateInterval|DateTime|int|null $expireDate = null ][, int|null $memberLimit = null ][, bool|null $createsJoinRequest = null ][, int|null $timeout = null ]) : ChatInviteLink
Parameters
$chatId : int|string
$name : string|null = null
$expireDate : DateInterval|DateTime|int|null = null
$memberLimit : int|null = null
$createsJoinRequest : bool|null = null
$timeout : int|null = null
Return values
ChatInviteLink
public createChatSubscriptionInviteLink(int|string $chatId, DateInterval|DateTime|int $subscriptionPeriod, int $subscriptionPrice[, string|null $name = null ][, int|null $timeout = null ]) : ChatInviteLink
Parameters
$chatId : int|string
$subscriptionPeriod : DateInterval|DateTime|int
$subscriptionPrice : int
$name : string|null = null
$timeout : int|null = null
Return values
ChatInviteLink

createForumTopic()

public createForumTopic(int|string $chatId, string $name[, int|null $iconColor = null ][, string|null $iconCustomEmojiId = null ][, int|null $timeout = null ]) : ForumTopic
Parameters
$chatId : int|string
$name : string
$iconColor : int|null = null
$iconCustomEmojiId : string|null = null
$timeout : int|null = null
Return values
ForumTopic
public createInvoiceLink(string $title, string $description, string $payload, string $currency, array<int, LabeledPrice$prices[, string|null $businessConnectionId = null ][, string|null $providerToken = null ][, int|null $subscriptionPeriod = null ][, int|null $maxTipAmount = null ][, null|array<int, int> $suggestedTipAmounts = null ][, string|null $providerData = null ][, string|null $photoUrl = null ][, int|null $photoSize = null ][, int|null $photoWidth = null ][, int|null $photoHeight = null ][, bool|null $needName = null ][, bool|null $needPhoneNumber = null ][, bool|null $needEmail = null ][, bool|null $needShippingAddress = null ][, bool|null $sendPhoneNumberToProvider = null ][, bool|null $sendEmailToProvider = null ][, bool|null $isFlexible = null ][, int|null $timeout = null ]) : string
Parameters
$title : string
$description : string
$payload : string
$currency : string
$prices : array<int, LabeledPrice>
$businessConnectionId : string|null = null
$providerToken : string|null = null
$subscriptionPeriod : int|null = null
$maxTipAmount : int|null = null
$suggestedTipAmounts : null|array<int, int> = null
$providerData : string|null = null
$photoUrl : string|null = null
$photoSize : int|null = null
$photoWidth : int|null = null
$photoHeight : int|null = null
$needName : bool|null = null
$needPhoneNumber : bool|null = null
$needEmail : bool|null = null
$needShippingAddress : bool|null = null
$sendPhoneNumberToProvider : bool|null = null
$sendEmailToProvider : bool|null = null
$isFlexible : bool|null = null
$timeout : int|null = null
Return values
string

createNewStickerSet()

public createNewStickerSet(int $userId, string $name, string $title, array<int, InputSticker$stickers[, string|null $stickerType = null ][, bool|null $needsRepainting = null ][, int|null $timeout = null ]) : bool
Parameters
$userId : int
$name : string
$title : string
$stickers : array<int, InputSticker>
$stickerType : string|null = null
$needsRepainting : bool|null = null
$timeout : int|null = null
Return values
bool

declineChatJoinRequest()

public declineChatJoinRequest(int|string $chatId, int $userId[, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$userId : int
$timeout : int|null = null
Return values
bool

declineSuggestedPost()

public declineSuggestedPost(int $chatId, int $messageId[, string|null $comment = null ][, int|null $timeout = null ]) : bool
Parameters
$chatId : int
$messageId : int
$comment : string|null = null
$timeout : int|null = null
Return values
bool

deleteAllMessageReactions()

public deleteAllMessageReactions(int|string $chatId[, int|null $userId = null ][, int|null $actorChatId = null ][, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$userId : int|null = null
$actorChatId : int|null = null
$timeout : int|null = null
Return values
bool

deleteBusinessMessages()

public deleteBusinessMessages(string $businessConnectionId, array<int, int> $messageIds[, int|null $timeout = null ]) : bool
Parameters
$businessConnectionId : string
$messageIds : array<int, int>
$timeout : int|null = null
Return values
bool

deleteChatPhoto()

public deleteChatPhoto(int|string $chatId[, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$timeout : int|null = null
Return values
bool

deleteChatStickerSet()

public deleteChatStickerSet(int|string $chatId[, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$timeout : int|null = null
Return values
bool

deleteForumTopic()

public deleteForumTopic(int|string $chatId, int $messageThreadId[, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$messageThreadId : int
$timeout : int|null = null
Return values
bool

deleteMessage()

public deleteMessage(int|string $chatId, int $messageId[, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$messageId : int
$timeout : int|null = null
Return values
bool

deleteMessageReaction()

public deleteMessageReaction(int|string $chatId, int $messageId[, int|null $userId = null ][, int|null $actorChatId = null ][, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$messageId : int
$userId : int|null = null
$actorChatId : int|null = null
$timeout : int|null = null
Return values
bool

deleteMessages()

public deleteMessages(int|string $chatId, array<int, int> $messageIds[, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$messageIds : array<int, int>
$timeout : int|null = null
Return values
bool

deleteMyCommands()

public deleteMyCommands([BotCommandScope|null $scope = null ][, string|null $languageCode = null ][, int|null $timeout = null ]) : bool
Parameters
$scope : BotCommandScope|null = null
$languageCode : string|null = null
$timeout : int|null = null
Return values
bool

deleteStickerFromSet()

public deleteStickerFromSet(string $sticker[, int|null $timeout = null ]) : bool
Parameters
$sticker : string
$timeout : int|null = null
Return values
bool

deleteStickerSet()

public deleteStickerSet(string $name[, int|null $timeout = null ]) : bool
Parameters
$name : string
$timeout : int|null = null
Return values
bool

deleteStory()

public deleteStory(string $businessConnectionId, int $storyId[, int|null $timeout = null ]) : bool
Parameters
$businessConnectionId : string
$storyId : int
$timeout : int|null = null
Return values
bool

deleteWebhook()

public deleteWebhook([bool|null $dropPendingUpdates = null ][, int|null $timeout = null ]) : bool
Parameters
$dropPendingUpdates : bool|null = null
$timeout : int|null = null
Return values
bool

download()

Mirrors aiogram's `bot.download(file: str | Downloadable, ...)`. A bare `string` is treated as a `file_id` and resolved via `getFile` before downloading; a `Downloadable` (Document/Photo/Voice/etc) is unwrapped via its `fileId()` method.

public download(Downloadable|string $object[, mixed $destination = null ][, int $timeout = 30 ][, int $chunkSize = 65536 ]) : string|null
Parameters
$object : Downloadable|string
$destination : mixed = null
$timeout : int = 30
$chunkSize : int = 65536
Return values
string|null

downloadFile()

public downloadFile(File|string $fileOrPath[, mixed $destination = null ][, int $timeout = 30 ][, int $chunkSize = 65536 ]) : string|null
Parameters
$fileOrPath : File|string
$destination : mixed = null
$timeout : int = 30
$chunkSize : int = 65536
Return values
string|null
public editChatInviteLink(int|string $chatId, string $inviteLink[, string|null $name = null ][, DateInterval|DateTime|int|null $expireDate = null ][, int|null $memberLimit = null ][, bool|null $createsJoinRequest = null ][, int|null $timeout = null ]) : ChatInviteLink
Parameters
$chatId : int|string
$inviteLink : string
$name : string|null = null
$expireDate : DateInterval|DateTime|int|null = null
$memberLimit : int|null = null
$createsJoinRequest : bool|null = null
$timeout : int|null = null
Return values
ChatInviteLink
public editChatSubscriptionInviteLink(int|string $chatId, string $inviteLink[, string|null $name = null ][, int|null $timeout = null ]) : ChatInviteLink
Parameters
$chatId : int|string
$inviteLink : string
$name : string|null = null
$timeout : int|null = null
Return values
ChatInviteLink

editForumTopic()

public editForumTopic(int|string $chatId, int $messageThreadId[, string|null $name = null ][, string|null $iconCustomEmojiId = null ][, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$messageThreadId : int
$name : string|null = null
$iconCustomEmojiId : string|null = null
$timeout : int|null = null
Return values
bool

editGeneralForumTopic()

public editGeneralForumTopic(int|string $chatId, string $name[, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$name : string
$timeout : int|null = null
Return values
bool

editMessageCaption()

public editMessageCaption([string|null $businessConnectionId = null ][, int|string|null $chatId = null ][, int|null $messageId = null ][, string|null $inlineMessageId = null ][, string|null $caption = null ][, BotDefault|string|null $parseMode = new BotDefault('parse_mode') ][, null|array<int, MessageEntity$captionEntities = null ][, bool|BotDefault|null $showCaptionAboveMedia = new BotDefault('show_caption_above_media') ][, InlineKeyboardMarkup|null $replyMarkup = null ][, int|null $timeout = null ]) : bool|Message
Parameters
$businessConnectionId : string|null = null
$chatId : int|string|null = null
$messageId : int|null = null
$inlineMessageId : string|null = null
$caption : string|null = null
$parseMode : BotDefault|string|null = new BotDefault('parse_mode')
$captionEntities : null|array<int, MessageEntity> = null
$showCaptionAboveMedia : bool|BotDefault|null = new BotDefault('show_caption_above_media')
$replyMarkup : InlineKeyboardMarkup|null = null
$timeout : int|null = null
Return values
bool|Message

editMessageChecklist()

public editMessageChecklist(string $businessConnectionId, int|string $chatId, int $messageId, InputChecklist $checklist[, InlineKeyboardMarkup|null $replyMarkup = null ][, int|null $timeout = null ]) : Message
Parameters
$businessConnectionId : string
$chatId : int|string
$messageId : int
$checklist : InputChecklist
$replyMarkup : InlineKeyboardMarkup|null = null
$timeout : int|null = null
Return values
Message

editMessageLiveLocation()

public editMessageLiveLocation(float $latitude, float $longitude[, string|null $businessConnectionId = null ][, int|string|null $chatId = null ][, int|null $messageId = null ][, string|null $inlineMessageId = null ][, int|null $livePeriod = null ][, float|null $horizontalAccuracy = null ][, int|null $heading = null ][, int|null $proximityAlertRadius = null ][, InlineKeyboardMarkup|null $replyMarkup = null ][, int|null $timeout = null ]) : bool|Message
Parameters
$latitude : float
$longitude : float
$businessConnectionId : string|null = null
$chatId : int|string|null = null
$messageId : int|null = null
$inlineMessageId : string|null = null
$livePeriod : int|null = null
$horizontalAccuracy : float|null = null
$heading : int|null = null
$proximityAlertRadius : int|null = null
$replyMarkup : InlineKeyboardMarkup|null = null
$timeout : int|null = null
Return values
bool|Message

editMessageMedia()

public editMessageMedia(InputMedia $media[, string|null $businessConnectionId = null ][, int|string|null $chatId = null ][, int|null $messageId = null ][, string|null $inlineMessageId = null ][, InlineKeyboardMarkup|null $replyMarkup = null ][, int|null $timeout = null ]) : bool|Message
Parameters
$media : InputMedia
$businessConnectionId : string|null = null
$chatId : int|string|null = null
$messageId : int|null = null
$inlineMessageId : string|null = null
$replyMarkup : InlineKeyboardMarkup|null = null
$timeout : int|null = null
Return values
bool|Message

editMessageReplyMarkup()

public editMessageReplyMarkup([string|null $businessConnectionId = null ][, int|string|null $chatId = null ][, int|null $messageId = null ][, string|null $inlineMessageId = null ][, InlineKeyboardMarkup|null $replyMarkup = null ][, int|null $timeout = null ]) : bool|Message
Parameters
$businessConnectionId : string|null = null
$chatId : int|string|null = null
$messageId : int|null = null
$inlineMessageId : string|null = null
$replyMarkup : InlineKeyboardMarkup|null = null
$timeout : int|null = null
Return values
bool|Message

editMessageText()

public editMessageText([string|null $text = null ][, string|null $businessConnectionId = null ][, int|string|null $chatId = null ][, int|null $messageId = null ][, string|null $inlineMessageId = null ][, BotDefault|string|null $parseMode = new BotDefault('parse_mode') ][, null|array<int, MessageEntity$entities = null ][, BotDefault|LinkPreviewOptions|null $linkPreviewOptions = new BotDefault('link_preview') ][, InlineKeyboardMarkup|null $replyMarkup = null ][, InputRichMessage|null $richMessage = null ][, int|null $timeout = null ]) : bool|Message
Parameters
$text : string|null = null
$businessConnectionId : string|null = null
$chatId : int|string|null = null
$messageId : int|null = null
$inlineMessageId : string|null = null
$parseMode : BotDefault|string|null = new BotDefault('parse_mode')
$entities : null|array<int, MessageEntity> = null
$linkPreviewOptions : BotDefault|LinkPreviewOptions|null = new BotDefault('link_preview')
$replyMarkup : InlineKeyboardMarkup|null = null
$richMessage : InputRichMessage|null = null
$timeout : int|null = null
Return values
bool|Message

editStory()

public editStory(string $businessConnectionId, int $storyId, InputStoryContent $content[, string|null $caption = null ][, string|null $parseMode = null ][, null|array<int, MessageEntity$captionEntities = null ][, null|array<int, StoryArea$areas = null ][, int|null $timeout = null ]) : Story
Parameters
$businessConnectionId : string
$storyId : int
$content : InputStoryContent
$caption : string|null = null
$parseMode : string|null = null
$captionEntities : null|array<int, MessageEntity> = null
$areas : null|array<int, StoryArea> = null
$timeout : int|null = null
Return values
Story

editUserStarSubscription()

public editUserStarSubscription(int $userId, string $telegramPaymentChargeId, bool $isCanceled[, int|null $timeout = null ]) : bool
Parameters
$userId : int
$telegramPaymentChargeId : string
$isCanceled : bool
$timeout : int|null = null
Return values
bool
public exportChatInviteLink(int|string $chatId[, int|null $timeout = null ]) : string
Parameters
$chatId : int|string
$timeout : int|null = null
Return values
string

forwardMessage()

public forwardMessage(int|string $chatId, int|string $fromChatId, int $messageId[, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, DateInterval|DateTime|int|null $videoStartTimestamp = null ][, bool|null $disableNotification = null ][, bool|BotDefault|null $protectContent = new BotDefault('protect_content') ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, int|null $timeout = null ]) : Message
Parameters
$chatId : int|string
$fromChatId : int|string
$messageId : int
$messageThreadId : int|null = null
$directMessagesTopicId : int|null = null
$videoStartTimestamp : DateInterval|DateTime|int|null = null
$disableNotification : bool|null = null
$protectContent : bool|BotDefault|null = new BotDefault('protect_content')
$messageEffectId : string|null = null
$suggestedPostParameters : SuggestedPostParameters|null = null
$timeout : int|null = null
Return values
Message

forwardMessages()

public forwardMessages(int|string $chatId, int|string $fromChatId, array<int, int> $messageIds[, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, bool|null $disableNotification = null ][, bool|null $protectContent = null ][, int|null $timeout = null ]) : array<int, MessageId>
Parameters
$chatId : int|string
$fromChatId : int|string
$messageIds : array<int, int>
$messageThreadId : int|null = null
$directMessagesTopicId : int|null = null
$disableNotification : bool|null = null
$protectContent : bool|null = null
$timeout : int|null = null
Return values
array<int, MessageId>

getAvailableGifts()

public getAvailableGifts([int|null $timeout = null ]) : Gifts
Parameters
$timeout : int|null = null
Return values
Gifts

getBusinessAccountGifts()

public getBusinessAccountGifts(string $businessConnectionId[, bool|null $excludeUnsaved = null ][, bool|null $excludeSaved = null ][, bool|null $excludeUnlimited = null ][, bool|null $excludeLimitedUpgradable = null ][, bool|null $excludeLimitedNonUpgradable = null ][, bool|null $excludeUnique = null ][, bool|null $excludeFromBlockchain = null ][, bool|null $sortByPrice = null ][, string|null $offset = null ][, int|null $limit = null ][, int|null $timeout = null ]) : OwnedGifts
Parameters
$businessConnectionId : string
$excludeUnsaved : bool|null = null
$excludeSaved : bool|null = null
$excludeUnlimited : bool|null = null
$excludeLimitedUpgradable : bool|null = null
$excludeLimitedNonUpgradable : bool|null = null
$excludeUnique : bool|null = null
$excludeFromBlockchain : bool|null = null
$sortByPrice : bool|null = null
$offset : string|null = null
$limit : int|null = null
$timeout : int|null = null
Return values
OwnedGifts

getBusinessAccountStarBalance()

public getBusinessAccountStarBalance(string $businessConnectionId[, int|null $timeout = null ]) : StarAmount
Parameters
$businessConnectionId : string
$timeout : int|null = null
Return values
StarAmount

getBusinessConnection()

public getBusinessConnection(string $businessConnectionId[, int|null $timeout = null ]) : BusinessConnection
Parameters
$businessConnectionId : string
$timeout : int|null = null
Return values
BusinessConnection

getChat()

public getChat(int|string $chatId[, int|null $timeout = null ]) : ChatFullInfo
Parameters
$chatId : int|string
$timeout : int|null = null
Return values
ChatFullInfo

getChatAdministrators()

public getChatAdministrators(int|string $chatId[, bool|null $returnBots = null ][, int|null $timeout = null ]) : array<int, ChatMember>
Parameters
$chatId : int|string
$returnBots : bool|null = null
$timeout : int|null = null
Return values
array<int, ChatMember>

getChatGifts()

public getChatGifts(int|string $chatId[, bool|null $excludeUnsaved = null ][, bool|null $excludeSaved = null ][, bool|null $excludeUnlimited = null ][, bool|null $excludeLimitedUpgradable = null ][, bool|null $excludeLimitedNonUpgradable = null ][, bool|null $excludeFromBlockchain = null ][, bool|null $excludeUnique = null ][, bool|null $sortByPrice = null ][, string|null $offset = null ][, int|null $limit = null ][, int|null $timeout = null ]) : OwnedGifts
Parameters
$chatId : int|string
$excludeUnsaved : bool|null = null
$excludeSaved : bool|null = null
$excludeUnlimited : bool|null = null
$excludeLimitedUpgradable : bool|null = null
$excludeLimitedNonUpgradable : bool|null = null
$excludeFromBlockchain : bool|null = null
$excludeUnique : bool|null = null
$sortByPrice : bool|null = null
$offset : string|null = null
$limit : int|null = null
$timeout : int|null = null
Return values
OwnedGifts

getChatMember()

public getChatMember(int|string $chatId, int $userId[, int|null $timeout = null ]) : ChatMember
Parameters
$chatId : int|string
$userId : int
$timeout : int|null = null
Return values
ChatMember

getChatMemberCount()

public getChatMemberCount(int|string $chatId[, int|null $timeout = null ]) : int
Parameters
$chatId : int|string
$timeout : int|null = null
Return values
int

getChatMenuButton()

public getChatMenuButton([int|null $chatId = null ][, int|null $timeout = null ]) : MenuButton
Parameters
$chatId : int|null = null
$timeout : int|null = null
Return values
MenuButton

getCustomEmojiStickers()

public getCustomEmojiStickers(array<int, string> $customEmojiIds[, int|null $timeout = null ]) : array<int, Sticker>
Parameters
$customEmojiIds : array<int, string>
$timeout : int|null = null
Return values
array<int, Sticker>

getFile()

public getFile(string $fileId[, int|null $timeout = null ]) : File
Parameters
$fileId : string
$timeout : int|null = null
Return values
File

getForumTopicIconStickers()

public getForumTopicIconStickers([int|null $timeout = null ]) : array<int, Sticker>
Parameters
$timeout : int|null = null
Return values
array<int, Sticker>

getGameHighScores()

public getGameHighScores(int $userId[, int|null $chatId = null ][, int|null $messageId = null ][, string|null $inlineMessageId = null ][, int|null $timeout = null ]) : array<int, GameHighScore>
Parameters
$userId : int
$chatId : int|null = null
$messageId : int|null = null
$inlineMessageId : string|null = null
$timeout : int|null = null
Return values
array<int, GameHighScore>

getManagedBotAccessSettings()

public getManagedBotAccessSettings(int $userId[, int|null $timeout = null ]) : BotAccessSettings
Parameters
$userId : int
$timeout : int|null = null
Return values
BotAccessSettings

getManagedBotToken()

public getManagedBotToken(int $userId[, int|null $timeout = null ]) : string
Parameters
$userId : int
$timeout : int|null = null
Return values
string

getMe()

public getMe([int|null $timeout = null ]) : User
Parameters
$timeout : int|null = null
Return values
User

getMyCommands()

public getMyCommands([BotCommandScope|null $scope = null ][, string|null $languageCode = null ][, int|null $timeout = null ]) : array<int, BotCommand>
Parameters
$scope : BotCommandScope|null = null
$languageCode : string|null = null
$timeout : int|null = null
Return values
array<int, BotCommand>

getMyDefaultAdministratorRights()

public getMyDefaultAdministratorRights([bool|null $forChannels = null ][, int|null $timeout = null ]) : ChatAdministratorRights
Parameters
$forChannels : bool|null = null
$timeout : int|null = null
Return values
ChatAdministratorRights

getMyDescription()

public getMyDescription([string|null $languageCode = null ][, int|null $timeout = null ]) : BotDescription
Parameters
$languageCode : string|null = null
$timeout : int|null = null
Return values
BotDescription

getMyName()

public getMyName([string|null $languageCode = null ][, int|null $timeout = null ]) : BotName
Parameters
$languageCode : string|null = null
$timeout : int|null = null
Return values
BotName

getMyShortDescription()

public getMyShortDescription([string|null $languageCode = null ][, int|null $timeout = null ]) : BotShortDescription
Parameters
$languageCode : string|null = null
$timeout : int|null = null
Return values
BotShortDescription

getMyStarBalance()

public getMyStarBalance([int|null $timeout = null ]) : StarAmount
Parameters
$timeout : int|null = null
Return values
StarAmount

getStarTransactions()

public getStarTransactions([int|null $offset = null ][, int|null $limit = null ][, int|null $timeout = null ]) : StarTransactions
Parameters
$offset : int|null = null
$limit : int|null = null
$timeout : int|null = null
Return values
StarTransactions

getStickerSet()

public getStickerSet(string $name[, int|null $timeout = null ]) : StickerSet
Parameters
$name : string
$timeout : int|null = null
Return values
StickerSet

getUpdates()

Note: $timeout is the long-poll timeout (seconds) carried on the wire to Telegram; $apiTimeout is the HTTP transport timeout for the underlying request.

public getUpdates([int|null $offset = null ][, int|null $limit = null ][, int|null $timeout = null ][, null|array<int, string> $allowedUpdates = null ][, int|null $apiTimeout = null ]) : array<int, Update>
Parameters
$offset : int|null = null
$limit : int|null = null
$timeout : int|null = null
$allowedUpdates : null|array<int, string> = null
$apiTimeout : int|null = null
Return values
array<int, Update>

getUserChatBoosts()

public getUserChatBoosts(int|string $chatId, int $userId[, int|null $timeout = null ]) : UserChatBoosts
Parameters
$chatId : int|string
$userId : int
$timeout : int|null = null
Return values
UserChatBoosts

getUserGifts()

public getUserGifts(int $userId[, bool|null $excludeUnlimited = null ][, bool|null $excludeLimitedUpgradable = null ][, bool|null $excludeLimitedNonUpgradable = null ][, bool|null $excludeFromBlockchain = null ][, bool|null $excludeUnique = null ][, bool|null $sortByPrice = null ][, string|null $offset = null ][, int|null $limit = null ][, int|null $timeout = null ]) : OwnedGifts
Parameters
$userId : int
$excludeUnlimited : bool|null = null
$excludeLimitedUpgradable : bool|null = null
$excludeLimitedNonUpgradable : bool|null = null
$excludeFromBlockchain : bool|null = null
$excludeUnique : bool|null = null
$sortByPrice : bool|null = null
$offset : string|null = null
$limit : int|null = null
$timeout : int|null = null
Return values
OwnedGifts

getUserPersonalChatMessages()

public getUserPersonalChatMessages(int $userId, int $limit[, int|null $timeout = null ]) : array<int, Message>
Parameters
$userId : int
$limit : int
$timeout : int|null = null
Return values
array<int, Message>

getUserProfileAudios()

public getUserProfileAudios(int $userId[, int|null $offset = null ][, int|null $limit = null ][, int|null $timeout = null ]) : UserProfileAudios
Parameters
$userId : int
$offset : int|null = null
$limit : int|null = null
$timeout : int|null = null
Return values
UserProfileAudios

getUserProfilePhotos()

public getUserProfilePhotos(int $userId[, int|null $offset = null ][, int|null $limit = null ][, int|null $timeout = null ]) : UserProfilePhotos
Parameters
$userId : int
$offset : int|null = null
$limit : int|null = null
$timeout : int|null = null
Return values
UserProfilePhotos

getWebhookInfo()

public getWebhookInfo([int|null $timeout = null ]) : WebhookInfo
Parameters
$timeout : int|null = null
Return values
WebhookInfo

giftPremiumSubscription()

public giftPremiumSubscription(int $userId, int $monthCount, int $starCount[, string|null $text = null ][, string|null $textParseMode = null ][, null|array<int, MessageEntity$textEntities = null ][, int|null $timeout = null ]) : bool
Parameters
$userId : int
$monthCount : int
$starCount : int
$text : string|null = null
$textParseMode : string|null = null
$textEntities : null|array<int, MessageEntity> = null
$timeout : int|null = null
Return values
bool

hideGeneralForumTopic()

public hideGeneralForumTopic(int|string $chatId[, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$timeout : int|null = null
Return values
bool

leaveChat()

public leaveChat(int|string $chatId[, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$timeout : int|null = null
Return values
bool

logOut()

public logOut([int|null $timeout = null ]) : bool
Parameters
$timeout : int|null = null
Return values
bool

pinChatMessage()

public pinChatMessage(int|string $chatId, int $messageId[, string|null $businessConnectionId = null ][, bool|null $disableNotification = null ][, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$messageId : int
$businessConnectionId : string|null = null
$disableNotification : bool|null = null
$timeout : int|null = null
Return values
bool

postStory()

public postStory(string $businessConnectionId, InputStoryContent $content, int $activePeriod[, string|null $caption = null ][, string|null $parseMode = null ][, null|array<int, MessageEntity$captionEntities = null ][, null|array<int, StoryArea$areas = null ][, bool|null $postToChatPage = null ][, bool|null $protectContent = null ][, int|null $timeout = null ]) : Story
Parameters
$businessConnectionId : string
$content : InputStoryContent
$activePeriod : int
$caption : string|null = null
$parseMode : string|null = null
$captionEntities : null|array<int, MessageEntity> = null
$areas : null|array<int, StoryArea> = null
$postToChatPage : bool|null = null
$protectContent : bool|null = null
$timeout : int|null = null
Return values
Story

promoteChatMember()

public promoteChatMember(int|string $chatId, int $userId[, bool|null $isAnonymous = null ][, bool|null $canManageChat = null ][, bool|null $canDeleteMessages = null ][, bool|null $canManageVideoChats = null ][, bool|null $canRestrictMembers = null ][, bool|null $canPromoteMembers = null ][, bool|null $canChangeInfo = null ][, bool|null $canInviteUsers = null ][, bool|null $canPostStories = null ][, bool|null $canEditStories = null ][, bool|null $canDeleteStories = null ][, bool|null $canPostMessages = null ][, bool|null $canEditMessages = null ][, bool|null $canPinMessages = null ][, bool|null $canManageTopics = null ][, bool|null $canManageDirectMessages = null ][, bool|null $canManageTags = null ][, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$userId : int
$isAnonymous : bool|null = null
$canManageChat : bool|null = null
$canDeleteMessages : bool|null = null
$canManageVideoChats : bool|null = null
$canRestrictMembers : bool|null = null
$canPromoteMembers : bool|null = null
$canChangeInfo : bool|null = null
$canInviteUsers : bool|null = null
$canPostStories : bool|null = null
$canEditStories : bool|null = null
$canDeleteStories : bool|null = null
$canPostMessages : bool|null = null
$canEditMessages : bool|null = null
$canPinMessages : bool|null = null
$canManageTopics : bool|null = null
$canManageDirectMessages : bool|null = null
$canManageTags : bool|null = null
$timeout : int|null = null
Return values
bool

readBusinessMessage()

public readBusinessMessage(string $businessConnectionId, int $chatId, int $messageId[, int|null $timeout = null ]) : bool
Parameters
$businessConnectionId : string
$chatId : int
$messageId : int
$timeout : int|null = null
Return values
bool

refundStarPayment()

public refundStarPayment(int $userId, string $telegramPaymentChargeId[, int|null $timeout = null ]) : bool
Parameters
$userId : int
$telegramPaymentChargeId : string
$timeout : int|null = null
Return values
bool

removeBusinessAccountProfilePhoto()

public removeBusinessAccountProfilePhoto(string $businessConnectionId[, bool|null $isPublic = null ][, int|null $timeout = null ]) : bool
Parameters
$businessConnectionId : string
$isPublic : bool|null = null
$timeout : int|null = null
Return values
bool

removeChatVerification()

public removeChatVerification(int|string $chatId[, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$timeout : int|null = null
Return values
bool

removeMyProfilePhoto()

public removeMyProfilePhoto([int|null $timeout = null ]) : bool
Parameters
$timeout : int|null = null
Return values
bool

removeUserVerification()

public removeUserVerification(int $userId[, int|null $timeout = null ]) : bool
Parameters
$userId : int
$timeout : int|null = null
Return values
bool

reopenForumTopic()

public reopenForumTopic(int|string $chatId, int $messageThreadId[, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$messageThreadId : int
$timeout : int|null = null
Return values
bool

reopenGeneralForumTopic()

public reopenGeneralForumTopic(int|string $chatId[, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$timeout : int|null = null
Return values
bool

replaceManagedBotToken()

public replaceManagedBotToken(int $userId[, int|null $timeout = null ]) : string
Parameters
$userId : int
$timeout : int|null = null
Return values
string

replaceStickerInSet()

public replaceStickerInSet(int $userId, string $name, string $oldSticker, InputSticker $sticker[, int|null $timeout = null ]) : bool
Parameters
$userId : int
$name : string
$oldSticker : string
$sticker : InputSticker
$timeout : int|null = null
Return values
bool

repostStory()

public repostStory(string $businessConnectionId, int $fromChatId, int $fromStoryId, int $activePeriod[, bool|null $postToChatPage = null ][, bool|null $protectContent = null ][, int|null $timeout = null ]) : Story
Parameters
$businessConnectionId : string
$fromChatId : int
$fromStoryId : int
$activePeriod : int
$postToChatPage : bool|null = null
$protectContent : bool|null = null
$timeout : int|null = null
Return values
Story

restrictChatMember()

public restrictChatMember(int|string $chatId, int $userId, ChatPermissions $permissions[, bool|null $useIndependentChatPermissions = null ][, DateInterval|DateTime|int|null $untilDate = null ][, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$userId : int
$permissions : ChatPermissions
$useIndependentChatPermissions : bool|null = null
$untilDate : DateInterval|DateTime|int|null = null
$timeout : int|null = null
Return values
bool
public revokeChatInviteLink(int|string $chatId, string $inviteLink[, int|null $timeout = null ]) : ChatInviteLink
Parameters
$chatId : int|string
$inviteLink : string
$timeout : int|null = null
Return values
ChatInviteLink

savePreparedInlineMessage()

public savePreparedInlineMessage(int $userId, InlineQueryResult $result[, bool|null $allowUserChats = null ][, bool|null $allowBotChats = null ][, bool|null $allowGroupChats = null ][, bool|null $allowChannelChats = null ][, int|null $timeout = null ]) : PreparedInlineMessage
Parameters
$userId : int
$result : InlineQueryResult
$allowUserChats : bool|null = null
$allowBotChats : bool|null = null
$allowGroupChats : bool|null = null
$allowChannelChats : bool|null = null
$timeout : int|null = null
Return values
PreparedInlineMessage

sendAnimation()

public sendAnimation(int|string $chatId, InputFile|string $animation[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, int|null $duration = null ][, int|null $width = null ][, int|null $height = null ][, InputFile|null $thumbnail = null ][, string|null $caption = null ][, BotDefault|string|null $parseMode = new BotDefault('parse_mode') ][, null|array<int, MessageEntity$captionEntities = null ][, bool|BotDefault|null $showCaptionAboveMedia = new BotDefault('show_caption_above_media') ][, bool|null $hasSpoiler = null ][, bool|null $disableNotification = null ][, bool|BotDefault|null $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ReplyParameters|null $replyParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ][, int|null $timeout = null ]) : Message
Parameters
$chatId : int|string
$animation : InputFile|string
$businessConnectionId : string|null = null
$messageThreadId : int|null = null
$directMessagesTopicId : int|null = null
$duration : int|null = null
$width : int|null = null
$height : int|null = null
$thumbnail : InputFile|null = null
$caption : string|null = null
$parseMode : BotDefault|string|null = new BotDefault('parse_mode')
$captionEntities : null|array<int, MessageEntity> = null
$showCaptionAboveMedia : bool|BotDefault|null = new BotDefault('show_caption_above_media')
$hasSpoiler : bool|null = null
$disableNotification : bool|null = null
$protectContent : bool|BotDefault|null = new BotDefault('protect_content')
$allowPaidBroadcast : bool|null = null
$messageEffectId : string|null = null
$suggestedPostParameters : SuggestedPostParameters|null = null
$replyParameters : ReplyParameters|null = null
$replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
$timeout : int|null = null
Return values
Message

sendAudio()

public sendAudio(int|string $chatId, InputFile|string $audio[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, string|null $caption = null ][, BotDefault|string|null $parseMode = new BotDefault('parse_mode') ][, null|array<int, MessageEntity$captionEntities = null ][, int|null $duration = null ][, string|null $performer = null ][, string|null $title = null ][, InputFile|null $thumbnail = null ][, bool|null $disableNotification = null ][, bool|BotDefault|null $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ReplyParameters|null $replyParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ][, int|null $timeout = null ]) : Message
Parameters
$chatId : int|string
$audio : InputFile|string
$businessConnectionId : string|null = null
$messageThreadId : int|null = null
$directMessagesTopicId : int|null = null
$caption : string|null = null
$parseMode : BotDefault|string|null = new BotDefault('parse_mode')
$captionEntities : null|array<int, MessageEntity> = null
$duration : int|null = null
$performer : string|null = null
$title : string|null = null
$thumbnail : InputFile|null = null
$disableNotification : bool|null = null
$protectContent : bool|BotDefault|null = new BotDefault('protect_content')
$allowPaidBroadcast : bool|null = null
$messageEffectId : string|null = null
$suggestedPostParameters : SuggestedPostParameters|null = null
$replyParameters : ReplyParameters|null = null
$replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
$timeout : int|null = null
Return values
Message

sendChatAction()

public sendChatAction(int|string $chatId, string $action[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$action : string
$businessConnectionId : string|null = null
$messageThreadId : int|null = null
$timeout : int|null = null
Return values
bool

sendChatJoinRequestWebApp()

public sendChatJoinRequestWebApp(string $chatJoinRequestQueryId, string $webAppUrl[, int|null $timeout = null ]) : bool
Parameters
$chatJoinRequestQueryId : string
$webAppUrl : string
$timeout : int|null = null
Return values
bool

sendChecklist()

public sendChecklist(string $businessConnectionId, int|string $chatId, InputChecklist $checklist[, bool|null $disableNotification = null ][, bool|null $protectContent = null ][, string|null $messageEffectId = null ][, ReplyParameters|null $replyParameters = null ][, InlineKeyboardMarkup|null $replyMarkup = null ][, int|null $timeout = null ]) : Message
Parameters
$businessConnectionId : string
$chatId : int|string
$checklist : InputChecklist
$disableNotification : bool|null = null
$protectContent : bool|null = null
$messageEffectId : string|null = null
$replyParameters : ReplyParameters|null = null
$replyMarkup : InlineKeyboardMarkup|null = null
$timeout : int|null = null
Return values
Message

sendContact()

public sendContact(int|string $chatId, string $phoneNumber, string $firstName[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, string|null $lastName = null ][, string|null $vcard = null ][, bool|null $disableNotification = null ][, bool|BotDefault|null $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ReplyParameters|null $replyParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ][, int|null $timeout = null ]) : Message
Parameters
$chatId : int|string
$phoneNumber : string
$firstName : string
$businessConnectionId : string|null = null
$messageThreadId : int|null = null
$directMessagesTopicId : int|null = null
$lastName : string|null = null
$vcard : string|null = null
$disableNotification : bool|null = null
$protectContent : bool|BotDefault|null = new BotDefault('protect_content')
$allowPaidBroadcast : bool|null = null
$messageEffectId : string|null = null
$suggestedPostParameters : SuggestedPostParameters|null = null
$replyParameters : ReplyParameters|null = null
$replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
$timeout : int|null = null
Return values
Message

sendDice()

public sendDice(int|string $chatId[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, string|null $emoji = null ][, bool|null $disableNotification = null ][, bool|BotDefault|null $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ReplyParameters|null $replyParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ][, int|null $timeout = null ]) : Message
Parameters
$chatId : int|string
$businessConnectionId : string|null = null
$messageThreadId : int|null = null
$directMessagesTopicId : int|null = null
$emoji : string|null = null
$disableNotification : bool|null = null
$protectContent : bool|BotDefault|null = new BotDefault('protect_content')
$allowPaidBroadcast : bool|null = null
$messageEffectId : string|null = null
$suggestedPostParameters : SuggestedPostParameters|null = null
$replyParameters : ReplyParameters|null = null
$replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
$timeout : int|null = null
Return values
Message

sendDocument()

public sendDocument(int|string $chatId, InputFile|string $document[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, InputFile|null $thumbnail = null ][, string|null $caption = null ][, BotDefault|string|null $parseMode = new BotDefault('parse_mode') ][, null|array<int, MessageEntity$captionEntities = null ][, bool|null $disableContentTypeDetection = null ][, bool|null $disableNotification = null ][, bool|BotDefault|null $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ReplyParameters|null $replyParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ][, int|null $timeout = null ]) : Message
Parameters
$chatId : int|string
$document : InputFile|string
$businessConnectionId : string|null = null
$messageThreadId : int|null = null
$directMessagesTopicId : int|null = null
$thumbnail : InputFile|null = null
$caption : string|null = null
$parseMode : BotDefault|string|null = new BotDefault('parse_mode')
$captionEntities : null|array<int, MessageEntity> = null
$disableContentTypeDetection : bool|null = null
$disableNotification : bool|null = null
$protectContent : bool|BotDefault|null = new BotDefault('protect_content')
$allowPaidBroadcast : bool|null = null
$messageEffectId : string|null = null
$suggestedPostParameters : SuggestedPostParameters|null = null
$replyParameters : ReplyParameters|null = null
$replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
$timeout : int|null = null
Return values
Message

sendGame()

public sendGame(int|string $chatId, string $gameShortName[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, bool|null $disableNotification = null ][, bool|BotDefault|null $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, ReplyParameters|null $replyParameters = null ][, InlineKeyboardMarkup|null $replyMarkup = null ][, int|null $timeout = null ]) : Message
Parameters
$chatId : int|string
$gameShortName : string
$businessConnectionId : string|null = null
$messageThreadId : int|null = null
$disableNotification : bool|null = null
$protectContent : bool|BotDefault|null = new BotDefault('protect_content')
$allowPaidBroadcast : bool|null = null
$messageEffectId : string|null = null
$replyParameters : ReplyParameters|null = null
$replyMarkup : InlineKeyboardMarkup|null = null
$timeout : int|null = null
Return values
Message

sendGift()

public sendGift(string $giftId[, int|null $userId = null ][, int|string|null $chatId = null ][, bool|null $payForUpgrade = null ][, string|null $text = null ][, string|null $textParseMode = null ][, null|array<int, MessageEntity$textEntities = null ][, int|null $timeout = null ]) : bool
Parameters
$giftId : string
$userId : int|null = null
$chatId : int|string|null = null
$payForUpgrade : bool|null = null
$text : string|null = null
$textParseMode : string|null = null
$textEntities : null|array<int, MessageEntity> = null
$timeout : int|null = null
Return values
bool

sendInvoice()

public sendInvoice(int|string $chatId, string $title, string $description, string $payload, string $currency, array<int, LabeledPrice$prices[, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, string|null $providerToken = null ][, int|null $maxTipAmount = null ][, null|array<int, int> $suggestedTipAmounts = null ][, string|null $startParameter = null ][, string|null $providerData = null ][, string|null $photoUrl = null ][, int|null $photoSize = null ][, int|null $photoWidth = null ][, int|null $photoHeight = null ][, bool|null $needName = null ][, bool|null $needPhoneNumber = null ][, bool|null $needEmail = null ][, bool|null $needShippingAddress = null ][, bool|null $sendPhoneNumberToProvider = null ][, bool|null $sendEmailToProvider = null ][, bool|null $isFlexible = null ][, bool|null $disableNotification = null ][, bool|BotDefault|null $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ReplyParameters|null $replyParameters = null ][, InlineKeyboardMarkup|null $replyMarkup = null ][, int|null $timeout = null ]) : Message
Parameters
$chatId : int|string
$title : string
$description : string
$payload : string
$currency : string
$prices : array<int, LabeledPrice>
$messageThreadId : int|null = null
$directMessagesTopicId : int|null = null
$providerToken : string|null = null
$maxTipAmount : int|null = null
$suggestedTipAmounts : null|array<int, int> = null
$startParameter : string|null = null
$providerData : string|null = null
$photoUrl : string|null = null
$photoSize : int|null = null
$photoWidth : int|null = null
$photoHeight : int|null = null
$needName : bool|null = null
$needPhoneNumber : bool|null = null
$needEmail : bool|null = null
$needShippingAddress : bool|null = null
$sendPhoneNumberToProvider : bool|null = null
$sendEmailToProvider : bool|null = null
$isFlexible : bool|null = null
$disableNotification : bool|null = null
$protectContent : bool|BotDefault|null = new BotDefault('protect_content')
$allowPaidBroadcast : bool|null = null
$messageEffectId : string|null = null
$suggestedPostParameters : SuggestedPostParameters|null = null
$replyParameters : ReplyParameters|null = null
$replyMarkup : InlineKeyboardMarkup|null = null
$timeout : int|null = null
Return values
Message

sendLivePhoto()

public sendLivePhoto(int|string $chatId, InputFile|string $livePhoto, InputFile|string $photo[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, string|null $caption = null ][, string|null $parseMode = null ][, null|array<int, MessageEntity$captionEntities = null ][, bool|null $showCaptionAboveMedia = null ][, bool|null $hasSpoiler = null ][, bool|null $disableNotification = null ][, bool|null $protectContent = null ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ReplyParameters|null $replyParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ][, int|null $timeout = null ]) : Message
Parameters
$chatId : int|string
$livePhoto : InputFile|string
$photo : InputFile|string
$businessConnectionId : string|null = null
$messageThreadId : int|null = null
$directMessagesTopicId : int|null = null
$caption : string|null = null
$parseMode : string|null = null
$captionEntities : null|array<int, MessageEntity> = null
$showCaptionAboveMedia : bool|null = null
$hasSpoiler : bool|null = null
$disableNotification : bool|null = null
$protectContent : bool|null = null
$allowPaidBroadcast : bool|null = null
$messageEffectId : string|null = null
$suggestedPostParameters : SuggestedPostParameters|null = null
$replyParameters : ReplyParameters|null = null
$replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
$timeout : int|null = null
Return values
Message

sendLocation()

public sendLocation(int|string $chatId, float $latitude, float $longitude[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, float|null $horizontalAccuracy = null ][, int|null $livePeriod = null ][, int|null $heading = null ][, int|null $proximityAlertRadius = null ][, bool|null $disableNotification = null ][, bool|BotDefault|null $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ReplyParameters|null $replyParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ][, int|null $timeout = null ]) : Message
Parameters
$chatId : int|string
$latitude : float
$longitude : float
$businessConnectionId : string|null = null
$messageThreadId : int|null = null
$directMessagesTopicId : int|null = null
$horizontalAccuracy : float|null = null
$livePeriod : int|null = null
$heading : int|null = null
$proximityAlertRadius : int|null = null
$disableNotification : bool|null = null
$protectContent : bool|BotDefault|null = new BotDefault('protect_content')
$allowPaidBroadcast : bool|null = null
$messageEffectId : string|null = null
$suggestedPostParameters : SuggestedPostParameters|null = null
$replyParameters : ReplyParameters|null = null
$replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
$timeout : int|null = null
Return values
Message

sendMediaGroup()

public sendMediaGroup(int|string $chatId, array<int, InputMediaAudio|InputMediaDocument|InputMediaLivePhoto|InputMediaPhoto|InputMediaVideo$media[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, bool|null $disableNotification = null ][, bool|BotDefault|null $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, ReplyParameters|null $replyParameters = null ][, int|null $timeout = null ]) : array<int, Message>
Parameters
$chatId : int|string
$media : array<int, InputMediaAudio|InputMediaDocument|InputMediaLivePhoto|InputMediaPhoto|InputMediaVideo>
$businessConnectionId : string|null = null
$messageThreadId : int|null = null
$directMessagesTopicId : int|null = null
$disableNotification : bool|null = null
$protectContent : bool|BotDefault|null = new BotDefault('protect_content')
$allowPaidBroadcast : bool|null = null
$messageEffectId : string|null = null
$replyParameters : ReplyParameters|null = null
$timeout : int|null = null
Return values
array<int, Message>

sendMessage()

public sendMessage(int|string $chatId, string $text[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, BotDefault|string|null $parseMode = new BotDefault('parse_mode') ][, null|array<int, MessageEntity$entities = null ][, BotDefault|LinkPreviewOptions|null $linkPreviewOptions = new BotDefault('link_preview') ][, bool|null $disableNotification = null ][, bool|BotDefault|null $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ReplyParameters|null $replyParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ][, int|null $timeout = null ]) : Message
Parameters
$chatId : int|string
$text : string
$businessConnectionId : string|null = null
$messageThreadId : int|null = null
$directMessagesTopicId : int|null = null
$parseMode : BotDefault|string|null = new BotDefault('parse_mode')
$entities : null|array<int, MessageEntity> = null
$linkPreviewOptions : BotDefault|LinkPreviewOptions|null = new BotDefault('link_preview')
$disableNotification : bool|null = null
$protectContent : bool|BotDefault|null = new BotDefault('protect_content')
$allowPaidBroadcast : bool|null = null
$messageEffectId : string|null = null
$suggestedPostParameters : SuggestedPostParameters|null = null
$replyParameters : ReplyParameters|null = null
$replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
$timeout : int|null = null
Return values
Message

sendMessageDraft()

public sendMessageDraft(int $chatId, int $draftId[, int|null $messageThreadId = null ][, string|null $text = null ][, string|null $parseMode = null ][, null|array<int, MessageEntity$entities = null ][, int|null $timeout = null ]) : bool
Parameters
$chatId : int
$draftId : int
$messageThreadId : int|null = null
$text : string|null = null
$parseMode : string|null = null
$entities : null|array<int, MessageEntity> = null
$timeout : int|null = null
Return values
bool

sendPaidMedia()

public sendPaidMedia(int|string $chatId, int $starCount, array<int, InputPaidMedia$media[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, string|null $payload = null ][, string|null $caption = null ][, string|null $parseMode = null ][, null|array<int, MessageEntity$captionEntities = null ][, bool|null $showCaptionAboveMedia = null ][, bool|null $disableNotification = null ][, bool|null $protectContent = null ][, bool|null $allowPaidBroadcast = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ReplyParameters|null $replyParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ][, int|null $timeout = null ]) : Message
Parameters
$chatId : int|string
$starCount : int
$media : array<int, InputPaidMedia>
$businessConnectionId : string|null = null
$messageThreadId : int|null = null
$directMessagesTopicId : int|null = null
$payload : string|null = null
$caption : string|null = null
$parseMode : string|null = null
$captionEntities : null|array<int, MessageEntity> = null
$showCaptionAboveMedia : bool|null = null
$disableNotification : bool|null = null
$protectContent : bool|null = null
$allowPaidBroadcast : bool|null = null
$suggestedPostParameters : SuggestedPostParameters|null = null
$replyParameters : ReplyParameters|null = null
$replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
$timeout : int|null = null
Return values
Message

sendPhoto()

public sendPhoto(int|string $chatId, InputFile|string $photo[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, string|null $caption = null ][, BotDefault|string|null $parseMode = new BotDefault('parse_mode') ][, null|array<int, MessageEntity$captionEntities = null ][, bool|BotDefault|null $showCaptionAboveMedia = new BotDefault('show_caption_above_media') ][, bool|null $hasSpoiler = null ][, bool|null $disableNotification = null ][, bool|BotDefault|null $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ReplyParameters|null $replyParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ][, int|null $timeout = null ]) : Message
Parameters
$chatId : int|string
$photo : InputFile|string
$businessConnectionId : string|null = null
$messageThreadId : int|null = null
$directMessagesTopicId : int|null = null
$caption : string|null = null
$parseMode : BotDefault|string|null = new BotDefault('parse_mode')
$captionEntities : null|array<int, MessageEntity> = null
$showCaptionAboveMedia : bool|BotDefault|null = new BotDefault('show_caption_above_media')
$hasSpoiler : bool|null = null
$disableNotification : bool|null = null
$protectContent : bool|BotDefault|null = new BotDefault('protect_content')
$allowPaidBroadcast : bool|null = null
$messageEffectId : string|null = null
$suggestedPostParameters : SuggestedPostParameters|null = null
$replyParameters : ReplyParameters|null = null
$replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
$timeout : int|null = null
Return values
Message

sendPoll()

public sendPoll(int|string $chatId, string $question, array<int, InputPollOption|string> $options[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, BotDefault|string|null $questionParseMode = new BotDefault('parse_mode') ][, null|array<int, MessageEntity$questionEntities = null ][, bool|null $isAnonymous = null ][, string|null $type = null ][, bool|null $allowsMultipleAnswers = null ][, bool|null $allowsRevoting = null ][, bool|null $shuffleOptions = null ][, bool|null $allowAddingOptions = null ][, bool|null $hideResultsUntilCloses = null ][, bool|null $membersOnly = null ][, null|array<int, string> $countryCodes = null ][, null|array<int, int> $correctOptionIds = null ][, string|null $explanation = null ][, BotDefault|string|null $explanationParseMode = new BotDefault('parse_mode') ][, null|array<int, MessageEntity$explanationEntities = null ][, InputPollMediaInterface|null $explanationMedia = null ][, int|null $openPeriod = null ][, DateInterval|DateTime|int|null $closeDate = null ][, bool|null $isClosed = null ][, string|null $description = null ][, BotDefault|string|null $descriptionParseMode = new BotDefault('parse_mode') ][, null|array<int, MessageEntity$descriptionEntities = null ][, InputPollMediaInterface|null $media = null ][, bool|null $disableNotification = null ][, bool|BotDefault|null $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, ReplyParameters|null $replyParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ][, int|null $timeout = null ]) : Message
Parameters
$chatId : int|string
$question : string
$options : array<int, InputPollOption|string>
$businessConnectionId : string|null = null
$messageThreadId : int|null = null
$questionParseMode : BotDefault|string|null = new BotDefault('parse_mode')
$questionEntities : null|array<int, MessageEntity> = null
$isAnonymous : bool|null = null
$type : string|null = null
$allowsMultipleAnswers : bool|null = null
$allowsRevoting : bool|null = null
$shuffleOptions : bool|null = null
$allowAddingOptions : bool|null = null
$hideResultsUntilCloses : bool|null = null
$membersOnly : bool|null = null
$countryCodes : null|array<int, string> = null
$correctOptionIds : null|array<int, int> = null
$explanation : string|null = null
$explanationParseMode : BotDefault|string|null = new BotDefault('parse_mode')
$explanationEntities : null|array<int, MessageEntity> = null
$explanationMedia : InputPollMediaInterface|null = null
$openPeriod : int|null = null
$closeDate : DateInterval|DateTime|int|null = null
$isClosed : bool|null = null
$description : string|null = null
$descriptionParseMode : BotDefault|string|null = new BotDefault('parse_mode')
$descriptionEntities : null|array<int, MessageEntity> = null
$media : InputPollMediaInterface|null = null
$disableNotification : bool|null = null
$protectContent : bool|BotDefault|null = new BotDefault('protect_content')
$allowPaidBroadcast : bool|null = null
$messageEffectId : string|null = null
$replyParameters : ReplyParameters|null = null
$replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
$timeout : int|null = null
Return values
Message

sendRichMessage()

public sendRichMessage(int|string $chatId, InputRichMessage $richMessage[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, bool|null $disableNotification = null ][, bool|null $protectContent = null ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ReplyParameters|null $replyParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ][, int|null $timeout = null ]) : Message
Parameters
$chatId : int|string
$richMessage : InputRichMessage
$businessConnectionId : string|null = null
$messageThreadId : int|null = null
$directMessagesTopicId : int|null = null
$disableNotification : bool|null = null
$protectContent : bool|null = null
$allowPaidBroadcast : bool|null = null
$messageEffectId : string|null = null
$suggestedPostParameters : SuggestedPostParameters|null = null
$replyParameters : ReplyParameters|null = null
$replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
$timeout : int|null = null
Return values
Message

sendRichMessageDraft()

public sendRichMessageDraft(int $chatId, int $draftId, InputRichMessage $richMessage[, int|null $messageThreadId = null ][, int|null $timeout = null ]) : bool
Parameters
$chatId : int
$draftId : int
$richMessage : InputRichMessage
$messageThreadId : int|null = null
$timeout : int|null = null
Return values
bool

sendSticker()

public sendSticker(int|string $chatId, InputFile|string $sticker[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, string|null $emoji = null ][, bool|null $disableNotification = null ][, bool|BotDefault|null $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ReplyParameters|null $replyParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ][, int|null $timeout = null ]) : Message
Parameters
$chatId : int|string
$sticker : InputFile|string
$businessConnectionId : string|null = null
$messageThreadId : int|null = null
$directMessagesTopicId : int|null = null
$emoji : string|null = null
$disableNotification : bool|null = null
$protectContent : bool|BotDefault|null = new BotDefault('protect_content')
$allowPaidBroadcast : bool|null = null
$messageEffectId : string|null = null
$suggestedPostParameters : SuggestedPostParameters|null = null
$replyParameters : ReplyParameters|null = null
$replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
$timeout : int|null = null
Return values
Message

sendVenue()

public sendVenue(int|string $chatId, float $latitude, float $longitude, string $title, string $address[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, string|null $foursquareId = null ][, string|null $foursquareType = null ][, string|null $googlePlaceId = null ][, string|null $googlePlaceType = null ][, bool|null $disableNotification = null ][, bool|BotDefault|null $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ReplyParameters|null $replyParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ][, int|null $timeout = null ]) : Message
Parameters
$chatId : int|string
$latitude : float
$longitude : float
$title : string
$address : string
$businessConnectionId : string|null = null
$messageThreadId : int|null = null
$directMessagesTopicId : int|null = null
$foursquareId : string|null = null
$foursquareType : string|null = null
$googlePlaceId : string|null = null
$googlePlaceType : string|null = null
$disableNotification : bool|null = null
$protectContent : bool|BotDefault|null = new BotDefault('protect_content')
$allowPaidBroadcast : bool|null = null
$messageEffectId : string|null = null
$suggestedPostParameters : SuggestedPostParameters|null = null
$replyParameters : ReplyParameters|null = null
$replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
$timeout : int|null = null
Return values
Message

sendVideo()

public sendVideo(int|string $chatId, InputFile|string $video[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, int|null $duration = null ][, int|null $width = null ][, int|null $height = null ][, InputFile|null $thumbnail = null ][, InputFile|string|null $cover = null ][, DateInterval|DateTime|int|null $startTimestamp = null ][, string|null $caption = null ][, BotDefault|string|null $parseMode = new BotDefault('parse_mode') ][, null|array<int, MessageEntity$captionEntities = null ][, bool|BotDefault|null $showCaptionAboveMedia = new BotDefault('show_caption_above_media') ][, bool|null $hasSpoiler = null ][, bool|null $supportsStreaming = null ][, bool|null $disableNotification = null ][, bool|BotDefault|null $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ReplyParameters|null $replyParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ][, int|null $timeout = null ]) : Message
Parameters
$chatId : int|string
$video : InputFile|string
$businessConnectionId : string|null = null
$messageThreadId : int|null = null
$directMessagesTopicId : int|null = null
$duration : int|null = null
$width : int|null = null
$height : int|null = null
$thumbnail : InputFile|null = null
$cover : InputFile|string|null = null
$startTimestamp : DateInterval|DateTime|int|null = null
$caption : string|null = null
$parseMode : BotDefault|string|null = new BotDefault('parse_mode')
$captionEntities : null|array<int, MessageEntity> = null
$showCaptionAboveMedia : bool|BotDefault|null = new BotDefault('show_caption_above_media')
$hasSpoiler : bool|null = null
$supportsStreaming : bool|null = null
$disableNotification : bool|null = null
$protectContent : bool|BotDefault|null = new BotDefault('protect_content')
$allowPaidBroadcast : bool|null = null
$messageEffectId : string|null = null
$suggestedPostParameters : SuggestedPostParameters|null = null
$replyParameters : ReplyParameters|null = null
$replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
$timeout : int|null = null
Return values
Message

sendVideoNote()

public sendVideoNote(int|string $chatId, InputFile|string $videoNote[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, int|null $duration = null ][, int|null $length = null ][, InputFile|null $thumbnail = null ][, bool|null $disableNotification = null ][, bool|BotDefault|null $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ReplyParameters|null $replyParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ][, int|null $timeout = null ]) : Message
Parameters
$chatId : int|string
$videoNote : InputFile|string
$businessConnectionId : string|null = null
$messageThreadId : int|null = null
$directMessagesTopicId : int|null = null
$duration : int|null = null
$length : int|null = null
$thumbnail : InputFile|null = null
$disableNotification : bool|null = null
$protectContent : bool|BotDefault|null = new BotDefault('protect_content')
$allowPaidBroadcast : bool|null = null
$messageEffectId : string|null = null
$suggestedPostParameters : SuggestedPostParameters|null = null
$replyParameters : ReplyParameters|null = null
$replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
$timeout : int|null = null
Return values
Message

sendVoice()

public sendVoice(int|string $chatId, InputFile|string $voice[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, string|null $caption = null ][, BotDefault|string|null $parseMode = new BotDefault('parse_mode') ][, null|array<int, MessageEntity$captionEntities = null ][, int|null $duration = null ][, bool|null $disableNotification = null ][, bool|BotDefault|null $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ReplyParameters|null $replyParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ][, int|null $timeout = null ]) : Message
Parameters
$chatId : int|string
$voice : InputFile|string
$businessConnectionId : string|null = null
$messageThreadId : int|null = null
$directMessagesTopicId : int|null = null
$caption : string|null = null
$parseMode : BotDefault|string|null = new BotDefault('parse_mode')
$captionEntities : null|array<int, MessageEntity> = null
$duration : int|null = null
$disableNotification : bool|null = null
$protectContent : bool|BotDefault|null = new BotDefault('protect_content')
$allowPaidBroadcast : bool|null = null
$messageEffectId : string|null = null
$suggestedPostParameters : SuggestedPostParameters|null = null
$replyParameters : ReplyParameters|null = null
$replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
$timeout : int|null = null
Return values
Message

setBusinessAccountBio()

public setBusinessAccountBio(string $businessConnectionId[, string|null $bio = null ][, int|null $timeout = null ]) : bool
Parameters
$businessConnectionId : string
$bio : string|null = null
$timeout : int|null = null
Return values
bool

setBusinessAccountGiftSettings()

public setBusinessAccountGiftSettings(string $businessConnectionId, bool $showGiftButton, AcceptedGiftTypes $acceptedGiftTypes[, int|null $timeout = null ]) : bool
Parameters
$businessConnectionId : string
$showGiftButton : bool
$acceptedGiftTypes : AcceptedGiftTypes
$timeout : int|null = null
Return values
bool

setBusinessAccountName()

public setBusinessAccountName(string $businessConnectionId, string $firstName[, string|null $lastName = null ][, int|null $timeout = null ]) : bool
Parameters
$businessConnectionId : string
$firstName : string
$lastName : string|null = null
$timeout : int|null = null
Return values
bool

setBusinessAccountProfilePhoto()

public setBusinessAccountProfilePhoto(string $businessConnectionId, InputProfilePhoto $photo[, bool|null $isPublic = null ][, int|null $timeout = null ]) : bool
Parameters
$businessConnectionId : string
$photo : InputProfilePhoto
$isPublic : bool|null = null
$timeout : int|null = null
Return values
bool

setBusinessAccountUsername()

public setBusinessAccountUsername(string $businessConnectionId[, string|null $username = null ][, int|null $timeout = null ]) : bool
Parameters
$businessConnectionId : string
$username : string|null = null
$timeout : int|null = null
Return values
bool

setChatAdministratorCustomTitle()

public setChatAdministratorCustomTitle(int|string $chatId, int $userId, string $customTitle[, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$userId : int
$customTitle : string
$timeout : int|null = null
Return values
bool

setChatDescription()

public setChatDescription(int|string $chatId[, string|null $description = null ][, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$description : string|null = null
$timeout : int|null = null
Return values
bool

setChatMemberTag()

public setChatMemberTag(int|string $chatId, int $userId[, string|null $tag = null ][, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$userId : int
$tag : string|null = null
$timeout : int|null = null
Return values
bool

setChatPermissions()

public setChatPermissions(int|string $chatId, ChatPermissions $permissions[, bool|null $useIndependentChatPermissions = null ][, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$permissions : ChatPermissions
$useIndependentChatPermissions : bool|null = null
$timeout : int|null = null
Return values
bool

setChatPhoto()

public setChatPhoto(int|string $chatId, InputFile $photo[, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$photo : InputFile
$timeout : int|null = null
Return values
bool

setChatStickerSet()

public setChatStickerSet(int|string $chatId, string $stickerSetName[, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$stickerSetName : string
$timeout : int|null = null
Return values
bool

setChatTitle()

public setChatTitle(int|string $chatId, string $title[, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$title : string
$timeout : int|null = null
Return values
bool

setCurrent()

public static setCurrent(Bot|null $bot) : void
Parameters
$bot : Bot|null

setCustomEmojiStickerSetThumbnail()

public setCustomEmojiStickerSetThumbnail(string $name[, string|null $customEmojiId = null ][, int|null $timeout = null ]) : bool
Parameters
$name : string
$customEmojiId : string|null = null
$timeout : int|null = null
Return values
bool

setGameScore()

public setGameScore(int $userId, int $score[, bool|null $force = null ][, bool|null $disableEditMessage = null ][, int|null $chatId = null ][, int|null $messageId = null ][, string|null $inlineMessageId = null ][, int|null $timeout = null ]) : bool|Message
Parameters
$userId : int
$score : int
$force : bool|null = null
$disableEditMessage : bool|null = null
$chatId : int|null = null
$messageId : int|null = null
$inlineMessageId : string|null = null
$timeout : int|null = null
Return values
bool|Message

setManagedBotAccessSettings()

public setManagedBotAccessSettings(int $userId, bool $isAccessRestricted[, null|array<int, int> $addedUserIds = null ][, int|null $timeout = null ]) : bool
Parameters
$userId : int
$isAccessRestricted : bool
$addedUserIds : null|array<int, int> = null
$timeout : int|null = null
Return values
bool

setMessageReaction()

public setMessageReaction(int|string $chatId, int $messageId[, null|array<int, ReactionType$reaction = null ][, bool|null $isBig = null ][, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$messageId : int
$reaction : null|array<int, ReactionType> = null
$isBig : bool|null = null
$timeout : int|null = null
Return values
bool

setMyCommands()

public setMyCommands(array<int, BotCommand$commands[, BotCommandScope|null $scope = null ][, string|null $languageCode = null ][, int|null $timeout = null ]) : bool
Parameters
$commands : array<int, BotCommand>
$scope : BotCommandScope|null = null
$languageCode : string|null = null
$timeout : int|null = null
Return values
bool

setMyDefaultAdministratorRights()

public setMyDefaultAdministratorRights([ChatAdministratorRights|null $rights = null ][, bool|null $forChannels = null ][, int|null $timeout = null ]) : bool
Parameters
$rights : ChatAdministratorRights|null = null
$forChannels : bool|null = null
$timeout : int|null = null
Return values
bool

setMyDescription()

public setMyDescription([string|null $description = null ][, string|null $languageCode = null ][, int|null $timeout = null ]) : bool
Parameters
$description : string|null = null
$languageCode : string|null = null
$timeout : int|null = null
Return values
bool

setMyName()

public setMyName([string|null $name = null ][, string|null $languageCode = null ][, int|null $timeout = null ]) : bool
Parameters
$name : string|null = null
$languageCode : string|null = null
$timeout : int|null = null
Return values
bool

setMyProfilePhoto()

public setMyProfilePhoto(InputProfilePhoto $photo[, int|null $timeout = null ]) : bool
Parameters
$photo : InputProfilePhoto
$timeout : int|null = null
Return values
bool

setMyShortDescription()

public setMyShortDescription([string|null $shortDescription = null ][, string|null $languageCode = null ][, int|null $timeout = null ]) : bool
Parameters
$shortDescription : string|null = null
$languageCode : string|null = null
$timeout : int|null = null
Return values
bool

setPassportDataErrors()

public setPassportDataErrors(int $userId, array<int, PassportElementError$errors[, int|null $timeout = null ]) : bool
Parameters
$userId : int
$errors : array<int, PassportElementError>
$timeout : int|null = null
Return values
bool

setStickerEmojiList()

public setStickerEmojiList(string $sticker, array<int, string> $emojiList[, int|null $timeout = null ]) : bool
Parameters
$sticker : string
$emojiList : array<int, string>
$timeout : int|null = null
Return values
bool

setStickerKeywords()

public setStickerKeywords(string $sticker[, null|array<int, string> $keywords = null ][, int|null $timeout = null ]) : bool
Parameters
$sticker : string
$keywords : null|array<int, string> = null
$timeout : int|null = null
Return values
bool

setStickerMaskPosition()

public setStickerMaskPosition(string $sticker[, MaskPosition|null $maskPosition = null ][, int|null $timeout = null ]) : bool
Parameters
$sticker : string
$maskPosition : MaskPosition|null = null
$timeout : int|null = null
Return values
bool

setStickerPositionInSet()

public setStickerPositionInSet(string $sticker, int $position[, int|null $timeout = null ]) : bool
Parameters
$sticker : string
$position : int
$timeout : int|null = null
Return values
bool

setStickerSetThumbnail()

public setStickerSetThumbnail(string $name, int $userId, string $format[, InputFile|string|null $thumbnail = null ][, int|null $timeout = null ]) : bool
Parameters
$name : string
$userId : int
$format : string
$thumbnail : InputFile|string|null = null
$timeout : int|null = null
Return values
bool

setStickerSetTitle()

public setStickerSetTitle(string $name, string $title[, int|null $timeout = null ]) : bool
Parameters
$name : string
$title : string
$timeout : int|null = null
Return values
bool

setUserEmojiStatus()

public setUserEmojiStatus(int $userId[, string|null $emojiStatusCustomEmojiId = null ][, DateInterval|DateTime|int|null $emojiStatusExpirationDate = null ][, int|null $timeout = null ]) : bool
Parameters
$userId : int
$emojiStatusCustomEmojiId : string|null = null
$emojiStatusExpirationDate : DateInterval|DateTime|int|null = null
$timeout : int|null = null
Return values
bool

setWebhook()

public setWebhook(string $url[, InputFile|null $certificate = null ][, string|null $ipAddress = null ][, int|null $maxConnections = null ][, null|array<int, string> $allowedUpdates = null ][, bool|null $dropPendingUpdates = null ][, string|null $secretToken = null ][, int|null $timeout = null ]) : bool
Parameters
$url : string
$certificate : InputFile|null = null
$ipAddress : string|null = null
$maxConnections : int|null = null
$allowedUpdates : null|array<int, string> = null
$dropPendingUpdates : bool|null = null
$secretToken : string|null = null
$timeout : int|null = null
Return values
bool

stopMessageLiveLocation()

public stopMessageLiveLocation([string|null $businessConnectionId = null ][, int|string|null $chatId = null ][, int|null $messageId = null ][, string|null $inlineMessageId = null ][, InlineKeyboardMarkup|null $replyMarkup = null ][, int|null $timeout = null ]) : bool|Message
Parameters
$businessConnectionId : string|null = null
$chatId : int|string|null = null
$messageId : int|null = null
$inlineMessageId : string|null = null
$replyMarkup : InlineKeyboardMarkup|null = null
$timeout : int|null = null
Return values
bool|Message

stopPoll()

public stopPoll(int|string $chatId, int $messageId[, string|null $businessConnectionId = null ][, InlineKeyboardMarkup|null $replyMarkup = null ][, int|null $timeout = null ]) : Poll
Parameters
$chatId : int|string
$messageId : int
$businessConnectionId : string|null = null
$replyMarkup : InlineKeyboardMarkup|null = null
$timeout : int|null = null
Return values
Poll

transferBusinessAccountStars()

public transferBusinessAccountStars(string $businessConnectionId, int $starCount[, int|null $timeout = null ]) : bool
Parameters
$businessConnectionId : string
$starCount : int
$timeout : int|null = null
Return values
bool

transferGift()

public transferGift(string $businessConnectionId, string $ownedGiftId, int $newOwnerChatId[, int|null $starCount = null ][, int|null $timeout = null ]) : bool
Parameters
$businessConnectionId : string
$ownedGiftId : string
$newOwnerChatId : int
$starCount : int|null = null
$timeout : int|null = null
Return values
bool

unbanChatMember()

public unbanChatMember(int|string $chatId, int $userId[, bool|null $onlyIfBanned = null ][, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$userId : int
$onlyIfBanned : bool|null = null
$timeout : int|null = null
Return values
bool

unbanChatSenderChat()

public unbanChatSenderChat(int|string $chatId, int $senderChatId[, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$senderChatId : int
$timeout : int|null = null
Return values
bool

unhideGeneralForumTopic()

public unhideGeneralForumTopic(int|string $chatId[, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$timeout : int|null = null
Return values
bool

unpinAllChatMessages()

public unpinAllChatMessages(int|string $chatId[, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$timeout : int|null = null
Return values
bool

unpinAllForumTopicMessages()

public unpinAllForumTopicMessages(int|string $chatId, int $messageThreadId[, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$messageThreadId : int
$timeout : int|null = null
Return values
bool

unpinAllGeneralForumTopicMessages()

public unpinAllGeneralForumTopicMessages(int|string $chatId[, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$timeout : int|null = null
Return values
bool

unpinChatMessage()

public unpinChatMessage(int|string $chatId[, string|null $businessConnectionId = null ][, int|null $messageId = null ][, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$businessConnectionId : string|null = null
$messageId : int|null = null
$timeout : int|null = null
Return values
bool

upgradeGift()

public upgradeGift(string $businessConnectionId, string $ownedGiftId[, bool|null $keepOriginalDetails = null ][, int|null $starCount = null ][, int|null $timeout = null ]) : bool
Parameters
$businessConnectionId : string
$ownedGiftId : string
$keepOriginalDetails : bool|null = null
$starCount : int|null = null
$timeout : int|null = null
Return values
bool

uploadStickerFile()

public uploadStickerFile(int $userId, InputFile $sticker, string $stickerFormat[, int|null $timeout = null ]) : File
Parameters
$userId : int
$sticker : InputFile
$stickerFormat : string
$timeout : int|null = null
Return values
File

verifyChat()

public verifyChat(int|string $chatId[, string|null $customDescription = null ][, int|null $timeout = null ]) : bool
Parameters
$chatId : int|string
$customDescription : string|null = null
$timeout : int|null = null
Return values
bool

verifyUser()

public verifyUser(int $userId[, string|null $customDescription = null ][, int|null $timeout = null ]) : bool
Parameters
$userId : int
$customDescription : string|null = null
$timeout : int|null = null
Return values
bool

botLocal()

private static botLocal() : FiberLocal<string|int, Bot|null>
Return values
FiberLocal<string|int, Bot|null>

consumeStream()

private consumeStream(ReadableStream $stream, mixed $destination) : string|null
Parameters
$stream : ReadableStream
$destination : mixed
Return values
string|null

makeBotLocal()

private static makeBotLocal(callable(): Array $init) : FiberLocal<string|int, Bot|null>
Parameters
$init : callable(): Array
Return values
FiberLocal<string|int, Bot|null>
On this page

Search results