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
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
$defaultProperties read-only
public
DefaultBotProperties
$defaultProperties
$session read-only
public
BaseSession
$session
$token read-only
public
string
$token
$cachedId
private
int|null
$cachedId
= null
$cachedMe
private
User|null
$cachedMe
= null
$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
__construct()
public
__construct(string $token[, BaseSession|null $session = null ][, DefaultBotProperties|null $defaultProperties = null ]) : mixed
Parameters
- $token : string
- $session : BaseSession|null = null
- $defaultProperties : DefaultBotProperties|null = null
__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
Return values
TReturnaddStickerToSet()
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
boolanswerCallbackQuery()
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
boolanswerChatJoinRequestQuery()
public
answerChatJoinRequestQuery(string $chatJoinRequestQueryId, string $result[, int|null $timeout = null ]) : bool
Parameters
- $chatJoinRequestQueryId : string
- $result : string
- $timeout : int|null = null
Return values
boolanswerGuestQuery()
public
answerGuestQuery(string $guestQueryId, InlineQueryResult $result[, int|null $timeout = null ]) : SentGuestMessage
Parameters
- $guestQueryId : string
- $result : InlineQueryResult
- $timeout : int|null = null
Return values
SentGuestMessageanswerInlineQuery()
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
boolanswerPreCheckoutQuery()
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
boolanswerShippingQuery()
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
boolanswerWebAppQuery()
public
answerWebAppQuery(string $webAppQueryId, InlineQueryResult $result[, int|null $timeout = null ]) : SentWebAppMessage
Parameters
- $webAppQueryId : string
- $result : InlineQueryResult
- $timeout : int|null = null
Return values
SentWebAppMessageapproveChatJoinRequest()
public
approveChatJoinRequest(int|string $chatId, int $userId[, int|null $timeout = null ]) : bool
Parameters
- $chatId : int|string
- $userId : int
- $timeout : int|null = null
Return values
boolapproveSuggestedPost()
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
boolbanChatMember()
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
boolbanChatSenderChat()
public
banChatSenderChat(int|string $chatId, int $senderChatId[, int|null $timeout = null ]) : bool
Parameters
- $chatId : int|string
- $senderChatId : int
- $timeout : int|null = null
Return values
boolclose()
public
close([int|null $timeout = null ]) : bool
Parameters
- $timeout : int|null = null
Return values
boolcloseForumTopic()
public
closeForumTopic(int|string $chatId, int $messageThreadId[, int|null $timeout = null ]) : bool
Parameters
- $chatId : int|string
- $messageThreadId : int
- $timeout : int|null = null
Return values
boolcloseGeneralForumTopic()
public
closeGeneralForumTopic(int|string $chatId[, int|null $timeout = null ]) : bool
Parameters
- $chatId : int|string
- $timeout : int|null = null
Return values
boolcontext()
`($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
ClosureconvertGiftToStars()
public
convertGiftToStars(string $businessConnectionId, string $ownedGiftId[, int|null $timeout = null ]) : bool
Parameters
- $businessConnectionId : string
- $ownedGiftId : string
- $timeout : int|null = null
Return values
boolcopyMessage()
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
MessageIdcopyMessages()
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>createChatInviteLink()
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
ChatInviteLinkcreateChatSubscriptionInviteLink()
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
ChatInviteLinkcreateForumTopic()
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
ForumTopiccreateInvoiceLink()
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
stringcreateNewStickerSet()
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
boolcurrent()
public
static current() : Bot|null
Return values
Bot|nulldeclineChatJoinRequest()
public
declineChatJoinRequest(int|string $chatId, int $userId[, int|null $timeout = null ]) : bool
Parameters
- $chatId : int|string
- $userId : int
- $timeout : int|null = null
Return values
booldeclineSuggestedPost()
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
booldeleteAllMessageReactions()
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
booldeleteBusinessMessages()
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
booldeleteChatPhoto()
public
deleteChatPhoto(int|string $chatId[, int|null $timeout = null ]) : bool
Parameters
- $chatId : int|string
- $timeout : int|null = null
Return values
booldeleteChatStickerSet()
public
deleteChatStickerSet(int|string $chatId[, int|null $timeout = null ]) : bool
Parameters
- $chatId : int|string
- $timeout : int|null = null
Return values
booldeleteForumTopic()
public
deleteForumTopic(int|string $chatId, int $messageThreadId[, int|null $timeout = null ]) : bool
Parameters
- $chatId : int|string
- $messageThreadId : int
- $timeout : int|null = null
Return values
booldeleteMessage()
public
deleteMessage(int|string $chatId, int $messageId[, int|null $timeout = null ]) : bool
Parameters
- $chatId : int|string
- $messageId : int
- $timeout : int|null = null
Return values
booldeleteMessageReaction()
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
booldeleteMessages()
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
booldeleteMyCommands()
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
booldeleteStickerFromSet()
public
deleteStickerFromSet(string $sticker[, int|null $timeout = null ]) : bool
Parameters
- $sticker : string
- $timeout : int|null = null
Return values
booldeleteStickerSet()
public
deleteStickerSet(string $name[, int|null $timeout = null ]) : bool
Parameters
- $name : string
- $timeout : int|null = null
Return values
booldeleteStory()
public
deleteStory(string $businessConnectionId, int $storyId[, int|null $timeout = null ]) : bool
Parameters
- $businessConnectionId : string
- $storyId : int
- $timeout : int|null = null
Return values
booldeleteWebhook()
public
deleteWebhook([bool|null $dropPendingUpdates = null ][, int|null $timeout = null ]) : bool
Parameters
- $dropPendingUpdates : bool|null = null
- $timeout : int|null = null
Return values
booldownload()
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|nulldownloadFile()
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|nulleditChatInviteLink()
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
ChatInviteLinkeditChatSubscriptionInviteLink()
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
ChatInviteLinkeditForumTopic()
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
booleditGeneralForumTopic()
public
editGeneralForumTopic(int|string $chatId, string $name[, int|null $timeout = null ]) : bool
Parameters
- $chatId : int|string
- $name : string
- $timeout : int|null = null
Return values
booleditMessageCaption()
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|MessageeditMessageChecklist()
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
MessageeditMessageLiveLocation()
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|MessageeditMessageMedia()
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|MessageeditMessageReplyMarkup()
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|MessageeditMessageText()
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|MessageeditStory()
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
StoryeditUserStarSubscription()
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
boolexportChatInviteLink()
public
exportChatInviteLink(int|string $chatId[, int|null $timeout = null ]) : string
Parameters
- $chatId : int|string
- $timeout : int|null = null
Return values
stringforwardMessage()
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
MessageforwardMessages()
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
GiftsgetBusinessAccountGifts()
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
OwnedGiftsgetBusinessAccountStarBalance()
public
getBusinessAccountStarBalance(string $businessConnectionId[, int|null $timeout = null ]) : StarAmount
Parameters
- $businessConnectionId : string
- $timeout : int|null = null
Return values
StarAmountgetBusinessConnection()
public
getBusinessConnection(string $businessConnectionId[, int|null $timeout = null ]) : BusinessConnection
Parameters
- $businessConnectionId : string
- $timeout : int|null = null
Return values
BusinessConnectiongetChat()
public
getChat(int|string $chatId[, int|null $timeout = null ]) : ChatFullInfo
Parameters
- $chatId : int|string
- $timeout : int|null = null
Return values
ChatFullInfogetChatAdministrators()
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
OwnedGiftsgetChatMember()
public
getChatMember(int|string $chatId, int $userId[, int|null $timeout = null ]) : ChatMember
Parameters
- $chatId : int|string
- $userId : int
- $timeout : int|null = null
Return values
ChatMembergetChatMemberCount()
public
getChatMemberCount(int|string $chatId[, int|null $timeout = null ]) : int
Parameters
- $chatId : int|string
- $timeout : int|null = null
Return values
intgetChatMenuButton()
public
getChatMenuButton([int|null $chatId = null ][, int|null $timeout = null ]) : MenuButton
Parameters
- $chatId : int|null = null
- $timeout : int|null = null
Return values
MenuButtongetCustomEmojiStickers()
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>getDefaultProperties()
public
getDefaultProperties() : DefaultBotProperties
Return values
DefaultBotPropertiesgetFile()
public
getFile(string $fileId[, int|null $timeout = null ]) : File
Parameters
- $fileId : string
- $timeout : int|null = null
Return values
FilegetForumTopicIconStickers()
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>getId()
public
getId() : int
Return values
intgetManagedBotAccessSettings()
public
getManagedBotAccessSettings(int $userId[, int|null $timeout = null ]) : BotAccessSettings
Parameters
- $userId : int
- $timeout : int|null = null
Return values
BotAccessSettingsgetManagedBotToken()
public
getManagedBotToken(int $userId[, int|null $timeout = null ]) : string
Parameters
- $userId : int
- $timeout : int|null = null
Return values
stringgetMe()
public
getMe([int|null $timeout = null ]) : User
Parameters
- $timeout : int|null = null
Return values
UsergetMyCommands()
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
ChatAdministratorRightsgetMyDescription()
public
getMyDescription([string|null $languageCode = null ][, int|null $timeout = null ]) : BotDescription
Parameters
- $languageCode : string|null = null
- $timeout : int|null = null
Return values
BotDescriptiongetMyName()
public
getMyName([string|null $languageCode = null ][, int|null $timeout = null ]) : BotName
Parameters
- $languageCode : string|null = null
- $timeout : int|null = null
Return values
BotNamegetMyShortDescription()
public
getMyShortDescription([string|null $languageCode = null ][, int|null $timeout = null ]) : BotShortDescription
Parameters
- $languageCode : string|null = null
- $timeout : int|null = null
Return values
BotShortDescriptiongetMyStarBalance()
public
getMyStarBalance([int|null $timeout = null ]) : StarAmount
Parameters
- $timeout : int|null = null
Return values
StarAmountgetStarTransactions()
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
StarTransactionsgetStickerSet()
public
getStickerSet(string $name[, int|null $timeout = null ]) : StickerSet
Parameters
- $name : string
- $timeout : int|null = null
Return values
StickerSetgetUpdates()
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
UserChatBoostsgetUserGifts()
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
OwnedGiftsgetUserPersonalChatMessages()
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
UserProfileAudiosgetUserProfilePhotos()
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
UserProfilePhotosgetWebhookInfo()
public
getWebhookInfo([int|null $timeout = null ]) : WebhookInfo
Parameters
- $timeout : int|null = null
Return values
WebhookInfogiftPremiumSubscription()
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
boolhideGeneralForumTopic()
public
hideGeneralForumTopic(int|string $chatId[, int|null $timeout = null ]) : bool
Parameters
- $chatId : int|string
- $timeout : int|null = null
Return values
boolleaveChat()
public
leaveChat(int|string $chatId[, int|null $timeout = null ]) : bool
Parameters
- $chatId : int|string
- $timeout : int|null = null
Return values
boollogOut()
public
logOut([int|null $timeout = null ]) : bool
Parameters
- $timeout : int|null = null
Return values
boolme()
public
me() : User
Return values
UserpinChatMessage()
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
boolpostStory()
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
StorypromoteChatMember()
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
boolreadBusinessMessage()
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
boolrefundStarPayment()
public
refundStarPayment(int $userId, string $telegramPaymentChargeId[, int|null $timeout = null ]) : bool
Parameters
- $userId : int
- $telegramPaymentChargeId : string
- $timeout : int|null = null
Return values
boolremoveBusinessAccountProfilePhoto()
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
boolremoveChatVerification()
public
removeChatVerification(int|string $chatId[, int|null $timeout = null ]) : bool
Parameters
- $chatId : int|string
- $timeout : int|null = null
Return values
boolremoveMyProfilePhoto()
public
removeMyProfilePhoto([int|null $timeout = null ]) : bool
Parameters
- $timeout : int|null = null
Return values
boolremoveUserVerification()
public
removeUserVerification(int $userId[, int|null $timeout = null ]) : bool
Parameters
- $userId : int
- $timeout : int|null = null
Return values
boolreopenForumTopic()
public
reopenForumTopic(int|string $chatId, int $messageThreadId[, int|null $timeout = null ]) : bool
Parameters
- $chatId : int|string
- $messageThreadId : int
- $timeout : int|null = null
Return values
boolreopenGeneralForumTopic()
public
reopenGeneralForumTopic(int|string $chatId[, int|null $timeout = null ]) : bool
Parameters
- $chatId : int|string
- $timeout : int|null = null
Return values
boolreplaceManagedBotToken()
public
replaceManagedBotToken(int $userId[, int|null $timeout = null ]) : string
Parameters
- $userId : int
- $timeout : int|null = null
Return values
stringreplaceStickerInSet()
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
boolrepostStory()
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
StoryrestrictChatMember()
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
boolrevokeChatInviteLink()
public
revokeChatInviteLink(int|string $chatId, string $inviteLink[, int|null $timeout = null ]) : ChatInviteLink
Parameters
- $chatId : int|string
- $inviteLink : string
- $timeout : int|null = null
Return values
ChatInviteLinksavePreparedInlineMessage()
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
PreparedInlineMessagesavePreparedKeyboardButton()
public
savePreparedKeyboardButton(int $userId, KeyboardButton $button[, int|null $timeout = null ]) : PreparedKeyboardButton
Parameters
- $userId : int
- $button : KeyboardButton
- $timeout : int|null = null
Return values
PreparedKeyboardButtonsendAnimation()
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
MessagesendAudio()
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
MessagesendChatAction()
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
boolsendChatJoinRequestWebApp()
public
sendChatJoinRequestWebApp(string $chatJoinRequestQueryId, string $webAppUrl[, int|null $timeout = null ]) : bool
Parameters
- $chatJoinRequestQueryId : string
- $webAppUrl : string
- $timeout : int|null = null
Return values
boolsendChecklist()
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
MessagesendContact()
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
MessagesendDice()
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
MessagesendDocument()
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
MessagesendGame()
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
MessagesendGift()
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
boolsendInvoice()
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
MessagesendLivePhoto()
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
MessagesendLocation()
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
MessagesendMediaGroup()
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
MessagesendMessageDraft()
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
boolsendPaidMedia()
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
MessagesendPhoto()
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
MessagesendPoll()
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
MessagesendRichMessage()
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
MessagesendRichMessageDraft()
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
boolsendSticker()
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
MessagesendVenue()
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
MessagesendVideo()
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
MessagesendVideoNote()
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
MessagesendVoice()
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
MessagesetBusinessAccountBio()
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
boolsetBusinessAccountGiftSettings()
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
boolsetBusinessAccountName()
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
boolsetBusinessAccountProfilePhoto()
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
boolsetBusinessAccountUsername()
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
boolsetChatAdministratorCustomTitle()
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
boolsetChatDescription()
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
boolsetChatMemberTag()
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
boolsetChatMenuButton()
public
setChatMenuButton([int|null $chatId = null ][, MenuButtonCommands|MenuButtonDefault|MenuButtonWebApp|null $menuButton = null ][, int|null $timeout = null ]) : bool
Parameters
- $chatId : int|null = null
- $menuButton : MenuButtonCommands|MenuButtonDefault|MenuButtonWebApp|null = null
- $timeout : int|null = null
Return values
boolsetChatPermissions()
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
boolsetChatPhoto()
public
setChatPhoto(int|string $chatId, InputFile $photo[, int|null $timeout = null ]) : bool
Parameters
- $chatId : int|string
- $photo : InputFile
- $timeout : int|null = null
Return values
boolsetChatStickerSet()
public
setChatStickerSet(int|string $chatId, string $stickerSetName[, int|null $timeout = null ]) : bool
Parameters
- $chatId : int|string
- $stickerSetName : string
- $timeout : int|null = null
Return values
boolsetChatTitle()
public
setChatTitle(int|string $chatId, string $title[, int|null $timeout = null ]) : bool
Parameters
- $chatId : int|string
- $title : string
- $timeout : int|null = null
Return values
boolsetCurrent()
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
boolsetGameScore()
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|MessagesetManagedBotAccessSettings()
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
boolsetMessageReaction()
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
boolsetMyCommands()
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
boolsetMyDefaultAdministratorRights()
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
boolsetMyDescription()
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
boolsetMyName()
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
boolsetMyProfilePhoto()
public
setMyProfilePhoto(InputProfilePhoto $photo[, int|null $timeout = null ]) : bool
Parameters
- $photo : InputProfilePhoto
- $timeout : int|null = null
Return values
boolsetMyShortDescription()
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
boolsetPassportDataErrors()
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
boolsetStickerEmojiList()
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
boolsetStickerKeywords()
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
boolsetStickerMaskPosition()
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
boolsetStickerPositionInSet()
public
setStickerPositionInSet(string $sticker, int $position[, int|null $timeout = null ]) : bool
Parameters
- $sticker : string
- $position : int
- $timeout : int|null = null
Return values
boolsetStickerSetThumbnail()
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
boolsetStickerSetTitle()
public
setStickerSetTitle(string $name, string $title[, int|null $timeout = null ]) : bool
Parameters
- $name : string
- $title : string
- $timeout : int|null = null
Return values
boolsetUserEmojiStatus()
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
boolsetWebhook()
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
boolstopMessageLiveLocation()
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|MessagestopPoll()
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
PolltransferBusinessAccountStars()
public
transferBusinessAccountStars(string $businessConnectionId, int $starCount[, int|null $timeout = null ]) : bool
Parameters
- $businessConnectionId : string
- $starCount : int
- $timeout : int|null = null
Return values
booltransferGift()
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
boolunbanChatMember()
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
boolunbanChatSenderChat()
public
unbanChatSenderChat(int|string $chatId, int $senderChatId[, int|null $timeout = null ]) : bool
Parameters
- $chatId : int|string
- $senderChatId : int
- $timeout : int|null = null
Return values
boolunhideGeneralForumTopic()
public
unhideGeneralForumTopic(int|string $chatId[, int|null $timeout = null ]) : bool
Parameters
- $chatId : int|string
- $timeout : int|null = null
Return values
boolunpinAllChatMessages()
public
unpinAllChatMessages(int|string $chatId[, int|null $timeout = null ]) : bool
Parameters
- $chatId : int|string
- $timeout : int|null = null
Return values
boolunpinAllForumTopicMessages()
public
unpinAllForumTopicMessages(int|string $chatId, int $messageThreadId[, int|null $timeout = null ]) : bool
Parameters
- $chatId : int|string
- $messageThreadId : int
- $timeout : int|null = null
Return values
boolunpinAllGeneralForumTopicMessages()
public
unpinAllGeneralForumTopicMessages(int|string $chatId[, int|null $timeout = null ]) : bool
Parameters
- $chatId : int|string
- $timeout : int|null = null
Return values
boolunpinChatMessage()
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
boolupgradeGift()
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
booluploadStickerFile()
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
FileverifyChat()
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
boolverifyUser()
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
boolbotLocal()
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|nullmakeBotLocal()
private
static makeBotLocal(callable(): Array $init) : FiberLocal<string|int, Bot|null>
Parameters
- $init : callable(): Array