ExternalReplyInfo
extends TelegramObject
in package
This object contains information about a message that is being replied to, which may come from another chat or forum topic.
Source: https://core.telegram.org/bots/api#externalreplyinfo
Table of Contents
Properties
- $animation : Animation|null
- $audio : Audio|null
- $bot : Bot|null
- $chat : Chat|null
- $checklist : Checklist|null
- $contact : Contact|null
- $dice : Dice|null
- $document : Document|null
- $game : Game|null
- $giveaway : Giveaway|null
- $giveawayWinners : GiveawayWinners|null
- $hasMediaSpoiler : bool|null
- $invoice : Invoice|null
- $linkPreviewOptions : LinkPreviewOptions|null
- $livePhoto : LivePhoto|null
- $location : Location|null
- $messageId : int|null
- $origin : MessageOrigin
- $paidMedia : PaidMediaInfo|null
- $photo : array<string|int, mixed>|null
- $poll : Poll|null
- $sticker : Sticker|null
- $story : Story|null
- $venue : Venue|null
- $video : Video|null
- $videoNote : VideoNote|null
- $voice : Voice|null
Methods
- __construct() : mixed
- as_() : static
- Alias of withBot() for grep-translating aiogram code that uses obj.as_(bot).
- 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
$animation read-only
public
Animation|null
$animation
= null
$audio read-only
public
Audio|null
$audio
= null
$bot read-only
public
Bot|null
$bot
= null
$chat read-only
public
Chat|null
$chat
= null
$checklist read-only
public
Checklist|null
$checklist
= null
$contact read-only
public
Contact|null
$contact
= null
$dice read-only
public
Dice|null
$dice
= null
$document read-only
public
Document|null
$document
= null
$game read-only
public
Game|null
$game
= null
$giveaway read-only
public
Giveaway|null
$giveaway
= null
$giveawayWinners read-only
public
GiveawayWinners|null
$giveawayWinners
= null
$hasMediaSpoiler read-only
public
bool|null
$hasMediaSpoiler
= null
$invoice read-only
public
Invoice|null
$invoice
= null
$linkPreviewOptions read-only
public
LinkPreviewOptions|null
$linkPreviewOptions
= null
$livePhoto read-only
public
LivePhoto|null
$livePhoto
= null
$location read-only
public
Location|null
$location
= null
$messageId read-only
public
int|null
$messageId
= null
$origin read-only
public
MessageOrigin
$origin
$paidMedia read-only
public
PaidMediaInfo|null
$paidMedia
= null
$photo read-only
public
array<string|int, mixed>|null
$photo
= null
$poll read-only
public
Poll|null
$poll
= null
$sticker read-only
public
Sticker|null
$sticker
= null
$story read-only
public
Story|null
$story
= null
$venue read-only
public
Venue|null
$venue
= null
$video read-only
public
Video|null
$video
= null
$videoNote read-only
public
VideoNote|null
$videoNote
= null
$voice read-only
public
Voice|null
$voice
= null
Methods
__construct()
public
__construct(MessageOrigin $origin[, Chat|null $chat = null ][, int|null $messageId = null ][, LinkPreviewOptions|null $linkPreviewOptions = null ][, Animation|null $animation = null ][, Audio|null $audio = null ][, Document|null $document = null ][, LivePhoto|null $livePhoto = null ][, PaidMediaInfo|null $paidMedia = null ][, null|array<int, PhotoSize> $photo = null ][, Sticker|null $sticker = null ][, Story|null $story = null ][, Video|null $video = null ][, VideoNote|null $videoNote = null ][, Voice|null $voice = null ][, bool|null $hasMediaSpoiler = null ][, Checklist|null $checklist = null ][, Contact|null $contact = null ][, Dice|null $dice = null ][, Game|null $game = null ][, Giveaway|null $giveaway = null ][, GiveawayWinners|null $giveawayWinners = null ][, Invoice|null $invoice = null ][, Location|null $location = null ][, Poll|null $poll = null ][, Venue|null $venue = null ][, Bot|null $bot = null ]) : mixed
Parameters
- $origin : MessageOrigin
- $chat : Chat|null = null
- $messageId : int|null = null
- $linkPreviewOptions : LinkPreviewOptions|null = null
- $animation : Animation|null = null
- $audio : Audio|null = null
- $document : Document|null = null
- $livePhoto : LivePhoto|null = null
- $paidMedia : PaidMediaInfo|null = null
- $photo : null|array<int, PhotoSize> = null
- $sticker : Sticker|null = null
- $story : Story|null = null
- $video : Video|null = null
- $videoNote : VideoNote|null = null
- $voice : Voice|null = null
- $hasMediaSpoiler : bool|null = null
- $checklist : Checklist|null = null
- $contact : Contact|null = null
- $dice : Dice|null = null
- $game : Game|null = null
- $giveaway : Giveaway|null = null
- $giveawayWinners : GiveawayWinners|null = null
- $invoice : Invoice|null = null
- $location : Location|null = null
- $poll : Poll|null = null
- $venue : Venue|null = null
- $bot : Bot|null = null
as_()
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
staticwithBot()
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