InaccessibleMessage
extends MaybeInaccessibleMessage
in package
uses
InaccessibleMessageShortcuts
This object describes a message that was deleted or is otherwise inaccessible to the bot.
Source: https://core.telegram.org/bots/api#inaccessiblemessage
Table of Contents
Properties
Methods
- __construct() : mixed
- answer() : SendMessage
- answerAnimation() : SendAnimation
- answerAudio() : SendAudio
- answerContact() : SendContact
- answerDice() : SendDice
- answerDocument() : SendDocument
- answerGame() : SendGame
- answerInvoice() : SendInvoice
- answerLocation() : SendLocation
- answerMediaGroup() : SendMediaGroup
- answerPaidMedia() : SendPaidMedia
- answerPhoto() : SendPhoto
- answerPoll() : SendPoll
- answerRich() : SendRichMessage
- answerSticker() : SendSticker
- answerVenue() : SendVenue
- answerVideo() : SendVideo
- answerVideoNote() : SendVideoNote
- answerVoice() : SendVoice
- as_() : static
- Alias of withBot() for grep-translating aiogram code that uses obj.as_(bot).
- asReplyParameters() : ReplyParameters
- Build a `ReplyParameters` referencing this inaccessible-message stub.
- reply() : SendMessage
- replyAnimation() : SendAnimation
- replyAudio() : SendAudio
- replyContact() : SendContact
- replyDice() : SendDice
- replyDocument() : SendDocument
- replyGame() : SendGame
- replyInvoice() : SendInvoice
- replyLocation() : SendLocation
- replyMediaGroup() : SendMediaGroup
- replyPaidMedia() : SendPaidMedia
- replyPhoto() : SendPhoto
- replyPoll() : SendPoll
- replyRich() : SendRichMessage
- replySticker() : SendSticker
- replyVenue() : SendVenue
- replyVideo() : SendVideo
- replyVideoNote() : SendVideoNote
- replyVoice() : SendVoice
- withBot() : static
- Returns a clone of $this with $bot rebound recursively. Walks every public property; nested `BotContextController` instances are rebound via their own `withBot`, arrays (including nested arrays of arbitrary depth — e.g.
Properties
$bot read-only
public
Bot|null
$bot
= null
$chat read-only
public
Chat
$chat
$date read-only
public
int
$date
$messageId read-only
public
int
$messageId
Methods
__construct()
public
__construct(Chat $chat, int $messageId, int $date[, Bot|null $bot = null ]) : mixed
Parameters
answer()
public
answer(string $text[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, BotDefault|string $parseMode = new BotDefault('parse_mode') ][, null|array<int, MessageEntity> $entities = null ][, BotDefault|LinkPreviewOptions $linkPreviewOptions = new BotDefault('link_preview') ][, bool|null $disableNotification = null ][, bool|BotDefault $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 ]) : SendMessage
Parameters
- $text : string
- $businessConnectionId : string|null = null
- $messageThreadId : int|null = null
- $directMessagesTopicId : int|null = null
- $parseMode : BotDefault|string = new BotDefault('parse_mode')
- $entities : null|array<int, MessageEntity> = null
- $linkPreviewOptions : BotDefault|LinkPreviewOptions = new BotDefault('link_preview')
- $disableNotification : bool|null = null
- $protectContent : bool|BotDefault = 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
Return values
SendMessageanswerAnimation()
public
answerAnimation(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 $parseMode = new BotDefault('parse_mode') ][, null|array<int, MessageEntity> $captionEntities = null ][, bool|BotDefault $showCaptionAboveMedia = new BotDefault('show_caption_above_media') ][, bool|null $hasSpoiler = null ][, bool|null $disableNotification = null ][, bool|BotDefault $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 ]) : SendAnimation
Parameters
- $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 = new BotDefault('parse_mode')
- $captionEntities : null|array<int, MessageEntity> = null
- $showCaptionAboveMedia : bool|BotDefault = new BotDefault('show_caption_above_media')
- $hasSpoiler : bool|null = null
- $disableNotification : bool|null = null
- $protectContent : bool|BotDefault = 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
Return values
SendAnimationanswerAudio()
public
answerAudio(InputFile|string $audio[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, string|null $caption = null ][, BotDefault|string $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 $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 ]) : SendAudio
Parameters
- $audio : InputFile|string
- $businessConnectionId : string|null = null
- $messageThreadId : int|null = null
- $directMessagesTopicId : int|null = null
- $caption : string|null = null
- $parseMode : BotDefault|string = 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 = 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
Return values
SendAudioanswerContact()
public
answerContact(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 $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 ]) : SendContact
Parameters
- $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 = 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
Return values
SendContactanswerDice()
public
answerDice([string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, string|null $emoji = null ][, bool|null $disableNotification = null ][, bool|BotDefault $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 ]) : SendDice
Parameters
- $businessConnectionId : string|null = null
- $messageThreadId : int|null = null
- $directMessagesTopicId : int|null = null
- $emoji : string|null = null
- $disableNotification : bool|null = null
- $protectContent : bool|BotDefault = 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
Return values
SendDiceanswerDocument()
public
answerDocument(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 $parseMode = new BotDefault('parse_mode') ][, null|array<int, MessageEntity> $captionEntities = null ][, bool|null $disableContentTypeDetection = null ][, bool|null $disableNotification = null ][, bool|BotDefault $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 ]) : SendDocument
Parameters
- $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 = new BotDefault('parse_mode')
- $captionEntities : null|array<int, MessageEntity> = null
- $disableContentTypeDetection : bool|null = null
- $disableNotification : bool|null = null
- $protectContent : bool|BotDefault = 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
Return values
SendDocumentanswerGame()
public
answerGame(string $gameShortName[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, bool|null $disableNotification = null ][, bool|BotDefault $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, ReplyParameters|null $replyParameters = null ][, InlineKeyboardMarkup|null $replyMarkup = null ]) : SendGame
Parameters
- $gameShortName : string
- $businessConnectionId : string|null = null
- $messageThreadId : int|null = null
- $disableNotification : bool|null = null
- $protectContent : bool|BotDefault = new BotDefault('protect_content')
- $allowPaidBroadcast : bool|null = null
- $messageEffectId : string|null = null
- $replyParameters : ReplyParameters|null = null
- $replyMarkup : InlineKeyboardMarkup|null = null
Return values
SendGameanswerInvoice()
public
answerInvoice(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 $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 ]) : SendInvoice
Parameters
- $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 = new BotDefault('protect_content')
- $allowPaidBroadcast : bool|null = null
- $messageEffectId : string|null = null
- $suggestedPostParameters : SuggestedPostParameters|null = null
- $replyParameters : ReplyParameters|null = null
- $replyMarkup : InlineKeyboardMarkup|null = null
Return values
SendInvoiceanswerLocation()
public
answerLocation(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 $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 ]) : SendLocation
Parameters
- $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 = 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
Return values
SendLocationanswerMediaGroup()
public
answerMediaGroup(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 $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, ReplyParameters|null $replyParameters = null ]) : SendMediaGroup
Parameters
- $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 = new BotDefault('protect_content')
- $allowPaidBroadcast : bool|null = null
- $messageEffectId : string|null = null
- $replyParameters : ReplyParameters|null = null
Return values
SendMediaGroupanswerPaidMedia()
public
answerPaidMedia(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 ]) : SendPaidMedia
Parameters
- $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
Return values
SendPaidMediaanswerPhoto()
public
answerPhoto(InputFile|string $photo[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, string|null $caption = null ][, BotDefault|string $parseMode = new BotDefault('parse_mode') ][, null|array<int, MessageEntity> $captionEntities = null ][, bool|BotDefault $showCaptionAboveMedia = new BotDefault('show_caption_above_media') ][, bool|null $hasSpoiler = null ][, bool|null $disableNotification = null ][, bool|BotDefault $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 ]) : SendPhoto
Parameters
- $photo : InputFile|string
- $businessConnectionId : string|null = null
- $messageThreadId : int|null = null
- $directMessagesTopicId : int|null = null
- $caption : string|null = null
- $parseMode : BotDefault|string = new BotDefault('parse_mode')
- $captionEntities : null|array<int, MessageEntity> = null
- $showCaptionAboveMedia : bool|BotDefault = new BotDefault('show_caption_above_media')
- $hasSpoiler : bool|null = null
- $disableNotification : bool|null = null
- $protectContent : bool|BotDefault = 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
Return values
SendPhotoanswerPoll()
public
answerPoll(string $question, array<int, InputPollOption|string> $options[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, BotDefault|string $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 $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 $descriptionParseMode = new BotDefault('parse_mode') ][, null|array<int, MessageEntity> $descriptionEntities = null ][, InputPollMediaInterface|null $media = null ][, bool|null $disableNotification = null ][, bool|BotDefault $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, ReplyParameters|null $replyParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ]) : SendPoll
Parameters
- $question : string
- $options : array<int, InputPollOption|string>
- $businessConnectionId : string|null = null
- $messageThreadId : int|null = null
- $questionParseMode : BotDefault|string = 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 = 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 = new BotDefault('parse_mode')
- $descriptionEntities : null|array<int, MessageEntity> = null
- $media : InputPollMediaInterface|null = null
- $disableNotification : bool|null = null
- $protectContent : bool|BotDefault = new BotDefault('protect_content')
- $allowPaidBroadcast : bool|null = null
- $messageEffectId : string|null = null
- $replyParameters : ReplyParameters|null = null
- $replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
Return values
SendPollanswerRich()
public
answerRich(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 ]) : SendRichMessage
Parameters
- $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
Return values
SendRichMessageanswerSticker()
public
answerSticker(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 $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 ]) : SendSticker
Parameters
- $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 = 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
Return values
SendStickeranswerVenue()
public
answerVenue(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 $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 ]) : SendVenue
Parameters
- $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 = 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
Return values
SendVenueanswerVideo()
public
answerVideo(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 $parseMode = new BotDefault('parse_mode') ][, null|array<int, MessageEntity> $captionEntities = null ][, bool|BotDefault $showCaptionAboveMedia = new BotDefault('show_caption_above_media') ][, bool|null $hasSpoiler = null ][, bool|null $supportsStreaming = null ][, bool|null $disableNotification = null ][, bool|BotDefault $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 ]) : SendVideo
Parameters
- $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 = new BotDefault('parse_mode')
- $captionEntities : null|array<int, MessageEntity> = null
- $showCaptionAboveMedia : bool|BotDefault = new BotDefault('show_caption_above_media')
- $hasSpoiler : bool|null = null
- $supportsStreaming : bool|null = null
- $disableNotification : bool|null = null
- $protectContent : bool|BotDefault = 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
Return values
SendVideoanswerVideoNote()
public
answerVideoNote(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 $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 ]) : SendVideoNote
Parameters
- $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 = 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
Return values
SendVideoNoteanswerVoice()
public
answerVoice(InputFile|string $voice[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, string|null $caption = null ][, BotDefault|string $parseMode = new BotDefault('parse_mode') ][, null|array<int, MessageEntity> $captionEntities = null ][, int|null $duration = null ][, bool|null $disableNotification = null ][, bool|BotDefault $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 ]) : SendVoice
Parameters
- $voice : InputFile|string
- $businessConnectionId : string|null = null
- $messageThreadId : int|null = null
- $directMessagesTopicId : int|null = null
- $caption : string|null = null
- $parseMode : BotDefault|string = new BotDefault('parse_mode')
- $captionEntities : null|array<int, MessageEntity> = null
- $duration : int|null = null
- $disableNotification : bool|null = null
- $protectContent : bool|BotDefault = 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
Return values
SendVoiceas_()
Alias of withBot() for grep-translating aiogram code that uses obj.as_(bot).
public
as_(Bot|null $bot) : static
IMPORTANT: behaves DIFFERENTLY from upstream — upstream mutates self.bot in place and returns self. The PHP port can't mutate readonly, so this returns a clone. Callers must reassign: $msg = $msg->as($bot).
Parameters
- $bot : Bot|null
Return values
staticasReplyParameters()
Build a `ReplyParameters` referencing this inaccessible-message stub.
public
asReplyParameters([bool|BotDefault|null $allowSendingWithoutReply = new BotDefault('allow_sending_without_reply') ][, string|null $quote = null ][, BotDefault|string|null $quoteParseMode = new BotDefault('parse_mode') ][, null|array<int, MessageEntity> $quoteEntities = null ][, int|null $quotePosition = null ]) : ReplyParameters
Mirrors aiogram's Message.as_reply_parameters(...). For a deleted /
inaccessible message the runtime API still accepts a
reply_parameters payload — the resulting send will fail server-side
if the underlying message is truly unreachable, but the construction
path stays uniform across Message and InaccessibleMessage.
Both allowSendingWithoutReply and quoteParseMode default to a
BotDefault(...) sentinel that mirrors aiogram's Default(...).
The sentinels pass through to ReplyParameters unchanged — deferred
resolution happens at wire-encode time in BaseSession::prepareValue.
Parameters
- $allowSendingWithoutReply : bool|BotDefault|null = new BotDefault('allow_sending_without_reply')
- $quote : string|null = null
- $quoteParseMode : BotDefault|string|null = new BotDefault('parse_mode')
- $quoteEntities : null|array<int, MessageEntity> = null
- $quotePosition : int|null = null
Return values
ReplyParametersreply()
public
reply(string $text[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, BotDefault|string $parseMode = new BotDefault('parse_mode') ][, null|array<int, MessageEntity> $entities = null ][, BotDefault|LinkPreviewOptions $linkPreviewOptions = new BotDefault('link_preview') ][, bool|null $disableNotification = null ][, bool|BotDefault $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ]) : SendMessage
Parameters
- $text : string
- $businessConnectionId : string|null = null
- $messageThreadId : int|null = null
- $directMessagesTopicId : int|null = null
- $parseMode : BotDefault|string = new BotDefault('parse_mode')
- $entities : null|array<int, MessageEntity> = null
- $linkPreviewOptions : BotDefault|LinkPreviewOptions = new BotDefault('link_preview')
- $disableNotification : bool|null = null
- $protectContent : bool|BotDefault = new BotDefault('protect_content')
- $allowPaidBroadcast : bool|null = null
- $messageEffectId : string|null = null
- $suggestedPostParameters : SuggestedPostParameters|null = null
- $replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
Return values
SendMessagereplyAnimation()
public
replyAnimation(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 $parseMode = new BotDefault('parse_mode') ][, null|array<int, MessageEntity> $captionEntities = null ][, bool|BotDefault $showCaptionAboveMedia = new BotDefault('show_caption_above_media') ][, bool|null $hasSpoiler = null ][, bool|null $disableNotification = null ][, bool|BotDefault $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ]) : SendAnimation
Parameters
- $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 = new BotDefault('parse_mode')
- $captionEntities : null|array<int, MessageEntity> = null
- $showCaptionAboveMedia : bool|BotDefault = new BotDefault('show_caption_above_media')
- $hasSpoiler : bool|null = null
- $disableNotification : bool|null = null
- $protectContent : bool|BotDefault = new BotDefault('protect_content')
- $allowPaidBroadcast : bool|null = null
- $messageEffectId : string|null = null
- $suggestedPostParameters : SuggestedPostParameters|null = null
- $replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
Return values
SendAnimationreplyAudio()
public
replyAudio(InputFile|string $audio[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, string|null $caption = null ][, BotDefault|string $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 $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ]) : SendAudio
Parameters
- $audio : InputFile|string
- $businessConnectionId : string|null = null
- $messageThreadId : int|null = null
- $directMessagesTopicId : int|null = null
- $caption : string|null = null
- $parseMode : BotDefault|string = 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 = new BotDefault('protect_content')
- $allowPaidBroadcast : bool|null = null
- $messageEffectId : string|null = null
- $suggestedPostParameters : SuggestedPostParameters|null = null
- $replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
Return values
SendAudioreplyContact()
public
replyContact(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 $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ]) : SendContact
Parameters
- $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 = new BotDefault('protect_content')
- $allowPaidBroadcast : bool|null = null
- $messageEffectId : string|null = null
- $suggestedPostParameters : SuggestedPostParameters|null = null
- $replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
Return values
SendContactreplyDice()
public
replyDice([string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, string|null $emoji = null ][, bool|null $disableNotification = null ][, bool|BotDefault $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ]) : SendDice
Parameters
- $businessConnectionId : string|null = null
- $messageThreadId : int|null = null
- $directMessagesTopicId : int|null = null
- $emoji : string|null = null
- $disableNotification : bool|null = null
- $protectContent : bool|BotDefault = new BotDefault('protect_content')
- $allowPaidBroadcast : bool|null = null
- $messageEffectId : string|null = null
- $suggestedPostParameters : SuggestedPostParameters|null = null
- $replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
Return values
SendDicereplyDocument()
public
replyDocument(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 $parseMode = new BotDefault('parse_mode') ][, null|array<int, MessageEntity> $captionEntities = null ][, bool|null $disableContentTypeDetection = null ][, bool|null $disableNotification = null ][, bool|BotDefault $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ]) : SendDocument
Parameters
- $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 = new BotDefault('parse_mode')
- $captionEntities : null|array<int, MessageEntity> = null
- $disableContentTypeDetection : bool|null = null
- $disableNotification : bool|null = null
- $protectContent : bool|BotDefault = new BotDefault('protect_content')
- $allowPaidBroadcast : bool|null = null
- $messageEffectId : string|null = null
- $suggestedPostParameters : SuggestedPostParameters|null = null
- $replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
Return values
SendDocumentreplyGame()
public
replyGame(string $gameShortName[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, bool|null $disableNotification = null ][, bool|BotDefault $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, InlineKeyboardMarkup|null $replyMarkup = null ]) : SendGame
Parameters
- $gameShortName : string
- $businessConnectionId : string|null = null
- $messageThreadId : int|null = null
- $disableNotification : bool|null = null
- $protectContent : bool|BotDefault = new BotDefault('protect_content')
- $allowPaidBroadcast : bool|null = null
- $messageEffectId : string|null = null
- $replyMarkup : InlineKeyboardMarkup|null = null
Return values
SendGamereplyInvoice()
public
replyInvoice(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 $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, InlineKeyboardMarkup|null $replyMarkup = null ]) : SendInvoice
Parameters
- $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 = new BotDefault('protect_content')
- $allowPaidBroadcast : bool|null = null
- $messageEffectId : string|null = null
- $suggestedPostParameters : SuggestedPostParameters|null = null
- $replyMarkup : InlineKeyboardMarkup|null = null
Return values
SendInvoicereplyLocation()
public
replyLocation(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 $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ]) : SendLocation
Parameters
- $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 = new BotDefault('protect_content')
- $allowPaidBroadcast : bool|null = null
- $messageEffectId : string|null = null
- $suggestedPostParameters : SuggestedPostParameters|null = null
- $replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
Return values
SendLocationreplyMediaGroup()
public
replyMediaGroup(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 $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ]) : SendMediaGroup
Parameters
- $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 = new BotDefault('protect_content')
- $allowPaidBroadcast : bool|null = null
- $messageEffectId : string|null = null
Return values
SendMediaGroupreplyPaidMedia()
public
replyPaidMedia(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 ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ]) : SendPaidMedia
Parameters
- $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
- $replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
Return values
SendPaidMediareplyPhoto()
public
replyPhoto(InputFile|string $photo[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, string|null $caption = null ][, BotDefault|string $parseMode = new BotDefault('parse_mode') ][, null|array<int, MessageEntity> $captionEntities = null ][, bool|BotDefault $showCaptionAboveMedia = new BotDefault('show_caption_above_media') ][, bool|null $hasSpoiler = null ][, bool|null $disableNotification = null ][, bool|BotDefault $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ]) : SendPhoto
Parameters
- $photo : InputFile|string
- $businessConnectionId : string|null = null
- $messageThreadId : int|null = null
- $directMessagesTopicId : int|null = null
- $caption : string|null = null
- $parseMode : BotDefault|string = new BotDefault('parse_mode')
- $captionEntities : null|array<int, MessageEntity> = null
- $showCaptionAboveMedia : bool|BotDefault = new BotDefault('show_caption_above_media')
- $hasSpoiler : bool|null = null
- $disableNotification : bool|null = null
- $protectContent : bool|BotDefault = new BotDefault('protect_content')
- $allowPaidBroadcast : bool|null = null
- $messageEffectId : string|null = null
- $suggestedPostParameters : SuggestedPostParameters|null = null
- $replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
Return values
SendPhotoreplyPoll()
public
replyPoll(string $question, array<int, InputPollOption|string> $options[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, BotDefault|string $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 $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 $descriptionParseMode = new BotDefault('parse_mode') ][, null|array<int, MessageEntity> $descriptionEntities = null ][, InputPollMediaInterface|null $media = null ][, bool|null $disableNotification = null ][, bool|BotDefault $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ]) : SendPoll
Parameters
- $question : string
- $options : array<int, InputPollOption|string>
- $businessConnectionId : string|null = null
- $messageThreadId : int|null = null
- $questionParseMode : BotDefault|string = 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 = 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 = new BotDefault('parse_mode')
- $descriptionEntities : null|array<int, MessageEntity> = null
- $media : InputPollMediaInterface|null = null
- $disableNotification : bool|null = null
- $protectContent : bool|BotDefault = new BotDefault('protect_content')
- $allowPaidBroadcast : bool|null = null
- $messageEffectId : string|null = null
- $replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
Return values
SendPollreplyRich()
public
replyRich(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 ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ]) : SendRichMessage
Parameters
- $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
- $replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
Return values
SendRichMessagereplySticker()
public
replySticker(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 $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ]) : SendSticker
Parameters
- $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 = new BotDefault('protect_content')
- $allowPaidBroadcast : bool|null = null
- $messageEffectId : string|null = null
- $suggestedPostParameters : SuggestedPostParameters|null = null
- $replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
Return values
SendStickerreplyVenue()
public
replyVenue(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 $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ]) : SendVenue
Parameters
- $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 = new BotDefault('protect_content')
- $allowPaidBroadcast : bool|null = null
- $messageEffectId : string|null = null
- $suggestedPostParameters : SuggestedPostParameters|null = null
- $replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
Return values
SendVenuereplyVideo()
public
replyVideo(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 $parseMode = new BotDefault('parse_mode') ][, null|array<int, MessageEntity> $captionEntities = null ][, bool|BotDefault $showCaptionAboveMedia = new BotDefault('show_caption_above_media') ][, bool|null $hasSpoiler = null ][, bool|null $supportsStreaming = null ][, bool|null $disableNotification = null ][, bool|BotDefault $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ]) : SendVideo
Parameters
- $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 = new BotDefault('parse_mode')
- $captionEntities : null|array<int, MessageEntity> = null
- $showCaptionAboveMedia : bool|BotDefault = new BotDefault('show_caption_above_media')
- $hasSpoiler : bool|null = null
- $supportsStreaming : bool|null = null
- $disableNotification : bool|null = null
- $protectContent : bool|BotDefault = new BotDefault('protect_content')
- $allowPaidBroadcast : bool|null = null
- $messageEffectId : string|null = null
- $suggestedPostParameters : SuggestedPostParameters|null = null
- $replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
Return values
SendVideoreplyVideoNote()
public
replyVideoNote(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 $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ]) : SendVideoNote
Parameters
- $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 = new BotDefault('protect_content')
- $allowPaidBroadcast : bool|null = null
- $messageEffectId : string|null = null
- $suggestedPostParameters : SuggestedPostParameters|null = null
- $replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
Return values
SendVideoNotereplyVoice()
public
replyVoice(InputFile|string $voice[, string|null $businessConnectionId = null ][, int|null $messageThreadId = null ][, int|null $directMessagesTopicId = null ][, string|null $caption = null ][, BotDefault|string $parseMode = new BotDefault('parse_mode') ][, null|array<int, MessageEntity> $captionEntities = null ][, int|null $duration = null ][, bool|null $disableNotification = null ][, bool|BotDefault $protectContent = new BotDefault('protect_content') ][, bool|null $allowPaidBroadcast = null ][, string|null $messageEffectId = null ][, SuggestedPostParameters|null $suggestedPostParameters = null ][, ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null $replyMarkup = null ]) : SendVoice
Parameters
- $voice : InputFile|string
- $businessConnectionId : string|null = null
- $messageThreadId : int|null = null
- $directMessagesTopicId : int|null = null
- $caption : string|null = null
- $parseMode : BotDefault|string = new BotDefault('parse_mode')
- $captionEntities : null|array<int, MessageEntity> = null
- $duration : int|null = null
- $disableNotification : bool|null = null
- $protectContent : bool|BotDefault = new BotDefault('protect_content')
- $allowPaidBroadcast : bool|null = null
- $messageEffectId : string|null = null
- $suggestedPostParameters : SuggestedPostParameters|null = null
- $replyMarkup : ForceReply|InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|null = null
Return values
SendVoicewithBot()
Returns a clone of $this with $bot rebound recursively. Walks every public property; nested `BotContextController` instances are rebound via their own `withBot`, arrays (including nested arrays of arbitrary depth — e.g.
public
withBot(Bot|null $bot) : static
list<list<KeyboardButton>>) are walked element-wise. Plain values
(scalars, DateTime, enums, InputFile etc.) pass through untouched.
Mirrors upstream pydantic model_validate(context={"bot": bot}) (aiogram
ContextController.as_/model_dump_json+model_validate).
Scope note: PHP 8.5 treats public readonly as effectively
public protected(set) readonly for clone-with — only code running with
a scope in the property's declaring class hierarchy (declaring class plus
its ancestors and descendants) can use clone($obj, ['x' => ...]) against
it. Because this method lives on BotContextController and every
TelegramObject/TelegramMethod subclass extends it, the walker's
clone($this, [...]) call legally rewrites subclass-declared readonly
slots like Message::$chat. External callers cannot use the same syntax
— they must funnel through this method.
Parameters
- $bot : Bot|null