danog\MadelineProto\EventHandler\AbstractMessage
Author: Daniil Gentili daniil@daniil.it
Represents an incoming or outgoing message.
Properties
$id
:int
Message ID$out
:bool
Whether the message is outgoing$chatId
:int
ID of the chat where the message was sent$senderId
:int
ID of the sender of the message$replyToMsgId
:?int
ID of the message to which this message is replying$date
:int
When was the message sent$topicId
:?int
ID of the forum topic where the message was sent$threadId
:?int
ID of the message thread where the message was sent$replyToScheduled
:bool
Whether this is a reply to a scheduled message$mentioned
:bool
Whether we were mentioned in this message$silent
:bool
Whether this message was sent without any notification (silently)$ttlPeriod
:?int
Time-to-live of the message
Method list:
isReply(): bool
getReply(class-string<T> $class = 'danog\\MadelineProto\\EventHandler\\AbstractMessage'): ?T
delete(boolean $revoke = true): void
reply(string $message, \danog\MadelineProto\ParseMode $parseMode = \danog\MadelineProto\ParseMode::TEXT, (array|null) $replyMarkup = NULL, (integer|string|null) $sendAs = NULL, (integer|null) $scheduleDate = NULL, boolean $noWebpage = false, boolean $silent = false, boolean $noForwards = false, boolean $background = false, boolean $clearDraft = false, boolean $updateStickersetsOrder = false, ?\Amp\Cancellation $cancellation = NULL): \danog\MadelineProto\EventHandler\Message
replyDocument((\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream) $file, (\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream|null) $thumb = NULL, string $caption = '', \danog\MadelineProto\ParseMode $parseMode = \danog\MadelineProto\ParseMode::TEXT, ?callable $callback = NULL, ?string $fileName = NULL, ?string $mimeType = NULL, ?int $ttl = NULL, bool $spoiler = false, (array|null) $replyMarkup = NULL, (integer|null) $sendAs = NULL, (integer|null) $scheduleDate = NULL, boolean $silent = false, bool $noForwards = false, boolean $background = false, boolean $clearDraft = false, boolean $updateStickersetsOrder = false, boolean $forceResend = false, \Amp\Cancellation $cancellation = NULL): \danog\MadelineProto\EventHandler\Message
replyVideo((\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream) $file, (\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream|null) $thumb = NULL, string $caption = '', \danog\MadelineProto\ParseMode $parseMode = \danog\MadelineProto\ParseMode::TEXT, ?callable $callback = NULL, ?string $fileName = NULL, string $mimeType = 'video/mp4', (integer|null) $ttl = NULL, boolean $spoiler = false, boolean $roundMessage = false, boolean $supportsStreaming = true, boolean $noSound = false, (integer|null) $duration = NULL, (integer|null) $width = NULL, (integer|null) $height = NULL, (array|null) $replyMarkup = NULL, (integer|string|null) $sendAs = NULL, (integer|null) $scheduleDate = NULL, boolean $silent = false, boolean $noForwards = false, boolean $background = false, boolean $clearDraft = false, boolean $forceResend = false, bool $updateStickersetsOrder = false, \Amp\Cancellation $cancellation = NULL): \danog\MadelineProto\EventHandler\Message
replyGif((\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream) $file, (\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream|null) $thumb = NULL, string $caption = '', \danog\MadelineProto\ParseMode $parseMode = \danog\MadelineProto\ParseMode::TEXT, ?callable $callback = NULL, ?string $fileName = NULL, (integer|null) $ttl = NULL, boolean $spoiler = false, (array|null) $replyMarkup = NULL, (integer|string|null) $sendAs = NULL, (integer|null) $scheduleDate = NULL, boolean $silent = false, boolean $noForwards = false, boolean $background = false, boolean $clearDraft = false, boolean $forceResend = false, ?\Amp\Cancellation $cancellation = NULL): \danog\MadelineProto\EventHandler\Message
replyAudio((\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream) $file, (\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream|null) $thumb = NULL, string $caption = '', \danog\MadelineProto\ParseMode $parseMode = \danog\MadelineProto\ParseMode::TEXT, ?callable $callback = NULL, ?string $fileName = NULL, ?string $mimeType = NULL, (integer|null) $duration = NULL, (string|null) $title = NULL, (string|null) $performer = NULL, ?int $ttl = NULL, (array|null) $replyMarkup = NULL, (integer|string|null) $sendAs = NULL, (integer|null) $scheduleDate = NULL, boolean $silent = false, boolean $noForwards = false, boolean $background = false, boolean $clearDraft = false, boolean $forceResend = false, ?\Amp\Cancellation $cancellation = NULL): \danog\MadelineProto\EventHandler\Message
replyVoice((\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream) $file, string $caption = '', \danog\MadelineProto\ParseMode $parseMode = \danog\MadelineProto\ParseMode::TEXT, ?callable $callback = NULL, ?string $fileName = NULL, (integer|null) $ttl = NULL, (integer|null) $duration = NULL, (array|null) $waveform = NULL, (array|null) $replyMarkup = NULL, (integer|string|null) $sendAs = NULL, (integer|null) $scheduleDate = NULL, boolean $silent = false, boolean $noForwards = false, boolean $background = false, boolean $clearDraft = false, boolean $forceResend = false, ?\Amp\Cancellation $cancellation = NULL): \danog\MadelineProto\EventHandler\Message
replyPhoto((\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream) $file, string $caption = '', \danog\MadelineProto\ParseMode $parseMode = \danog\MadelineProto\ParseMode::TEXT, ?callable $callback = NULL, ?string $fileName = NULL, ?int $ttl = NULL, bool $spoiler = false, (array|null) $replyMarkup = NULL, (integer|null) $sendAs = NULL, (integer|null) $scheduleDate = NULL, boolean $silent = false, bool $noForwards = false, boolean $background = false, boolean $clearDraft = false, boolean $updateStickersetsOrder = false, boolean $forceResend = false, \Amp\Cancellation $cancellation = NULL): \danog\MadelineProto\EventHandler\Message
replySticker((\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream) $file, string $mimeType, string $emoji = '', ?callable $callback = NULL, ?string $fileName = NULL, ?int $ttl = NULL, (array|null) $replyMarkup = NULL, (integer|null) $sendAs = NULL, (integer|null) $scheduleDate = NULL, boolean $silent = false, boolean $noForwards = false, boolean $background = false, boolean $clearDraft = false, boolean $updateStickersetsOrder = false, boolean $forceResend = false, \Amp\Cancellation $cancellation = NULL): \danog\MadelineProto\EventHandler\Message
sendText(string $message, \danog\MadelineProto\ParseMode $parseMode = \danog\MadelineProto\ParseMode::TEXT, (array|null) $replyMarkup = NULL, (integer|string|null) $sendAs = NULL, (integer|null) $scheduleDate = NULL, boolean $noWebpage = false, boolean $silent = false, boolean $noForwards = false, boolean $background = false, boolean $clearDraft = false, boolean $updateStickersetsOrder = false, ?\Amp\Cancellation $cancellation = NULL): \danog\MadelineProto\EventHandler\Message
block(): bool
unblock(): bool
getStories(): list<\danog\MadelineProto\EventHandler\AbstractStory>
- [
setAction(\danog\MadelineProto\EventHandler\Action $action = \danog\MadelineProto\EventHandler\Action\Typing::__set_state(array(]]): bool
](#setAction) read(bool $readAll = false): boolean
enableTTL(int<1, max> $seconds = 86400): \danog\MadelineProto\EventHandler\Message\Service\DialogSetTTL
disableTTL(): \danog\MadelineProto\EventHandler\Message\Service\DialogSetTTL
enableAutoTranslate(): bool
disableAutoTranslate(): bool
Methods:
isReply(): bool
Check if the current message replies to another message.
getReply(class-string<T> $class = 'danog\\MadelineProto\\EventHandler\\AbstractMessage'): ?T
Get replied-to message.
May return null if the replied-to message was deleted or if the message does not reply to any other message.
Parameters:
$class
:class-string<T>
Only return a reply if it is of the specified type, return null otherwise.
delete(boolean $revoke = true): void
Delete the message.
Parameters:
$revoke
:boolean
Whether to delete the message for all participants of the chat.
reply(string $message, \danog\MadelineProto\ParseMode $parseMode = \danog\MadelineProto\ParseMode::TEXT, (array|null) $replyMarkup = NULL, (integer|string|null) $sendAs = NULL, (integer|null) $scheduleDate = NULL, boolean $noWebpage = false, boolean $silent = false, boolean $noForwards = false, boolean $background = false, boolean $clearDraft = false, boolean $updateStickersetsOrder = false, ?\Amp\Cancellation $cancellation = NULL): \danog\MadelineProto\EventHandler\Message
Reply to the message.
Parameters:
$message
:string
Message to send$parseMode
:\danog\MadelineProto\ParseMode
Parse mode$replyMarkup
:(array|null)
Keyboard information.$sendAs
:(integer|string|null)
Peer to send the message as.$scheduleDate
:(integer|null)
Schedule date.$noWebpage
:boolean
Set this flag to disable generation of the webpage preview$silent
:boolean
Whether to send the message silently, without triggering notifications.$noForwards
:boolean
Only for bots, disallows further re-forwarding and saving of the messages, even if the destination chat doesn’t have content protection enabled$background
:boolean
Send this message as background message$clearDraft
:boolean
Clears the draft field$updateStickersetsOrder
:boolean
Whether to move used stickersets to top$cancellation
:?\Amp\Cancellation
See also:
\danog\MadelineProto\ParseMode
: Indicates a parsing mode for text.\Amp\Cancellation
\danog\MadelineProto\EventHandler\Message
: Represents an incoming or outgoing message.
replyDocument((\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream) $file, (\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream|null) $thumb = NULL, string $caption = '', \danog\MadelineProto\ParseMode $parseMode = \danog\MadelineProto\ParseMode::TEXT, ?callable $callback = NULL, ?string $fileName = NULL, ?string $mimeType = NULL, ?int $ttl = NULL, bool $spoiler = false, (array|null) $replyMarkup = NULL, (integer|null) $sendAs = NULL, (integer|null) $scheduleDate = NULL, boolean $silent = false, bool $noForwards = false, boolean $background = false, boolean $clearDraft = false, boolean $updateStickersetsOrder = false, boolean $forceResend = false, \Amp\Cancellation $cancellation = NULL): \danog\MadelineProto\EventHandler\Message
Reply a document.
Please use named arguments to call this method.
Parameters:
$file
:(\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream)
File to upload: can be a message to reuse media present in a message.$thumb
:(\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream|null)
Optional: Thumbnail to upload$caption
:string
Caption of document$parseMode
:\danog\MadelineProto\ParseMode
Text parse mode for the caption$callback
:?callable
$fileName
:?string
Optional file name, if absent will be extracted from the passed $file.$mimeType
:?string
$ttl
:?int
$spoiler
:bool
$replyMarkup
:(array|null)
Keyboard information.$sendAs
:(integer|null)
Peer to send the message as.$scheduleDate
:(integer|null)
Schedule date.$silent
:boolean
Whether to send the message silently, without triggering notifications.$noForwards
:bool
$background
:boolean
Send this message as background message$clearDraft
:boolean
Clears the draft field$updateStickersetsOrder
:boolean
Whether to move used stickersets to top$forceResend
:boolean
Whether to forcefully resend the file, even if its type and name are the same.$cancellation
:\Amp\Cancellation
Cancellation.
See also:
\danog\MadelineProto\EventHandler\Message
: Represents an incoming or outgoing message.\danog\MadelineProto\EventHandler\Media
: Represents a generic media.\danog\MadelineProto\LocalFile
: Indicates a local file to upload.\danog\MadelineProto\RemoteUrl
: Indicates a remote URL to upload.\danog\MadelineProto\BotApiFileId
: Indicates a bot API file ID to upload using sendDocument, sendPhoto etc…\Amp\ByteStream\ReadableStream
\danog\MadelineProto\ParseMode
: Indicates a parsing mode for text.\Amp\Cancellation
replyVideo((\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream) $file, (\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream|null) $thumb = NULL, string $caption = '', \danog\MadelineProto\ParseMode $parseMode = \danog\MadelineProto\ParseMode::TEXT, ?callable $callback = NULL, ?string $fileName = NULL, string $mimeType = 'video/mp4', (integer|null) $ttl = NULL, boolean $spoiler = false, boolean $roundMessage = false, boolean $supportsStreaming = true, boolean $noSound = false, (integer|null) $duration = NULL, (integer|null) $width = NULL, (integer|null) $height = NULL, (array|null) $replyMarkup = NULL, (integer|string|null) $sendAs = NULL, (integer|null) $scheduleDate = NULL, boolean $silent = false, boolean $noForwards = false, boolean $background = false, boolean $clearDraft = false, boolean $forceResend = false, bool $updateStickersetsOrder = false, \Amp\Cancellation $cancellation = NULL): \danog\MadelineProto\EventHandler\Message
Reply a video.
Please use named arguments to call this method.
Parameters:
$file
:(\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream)
File to upload: can be a message to reuse media present in a message.$thumb
:(\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream|null)
Optional: Thumbnail to upload$caption
:string
Caption of document$parseMode
:\danog\MadelineProto\ParseMode
Text parse mode for the caption$callback
:?callable
$fileName
:?string
Optional file name, if absent will be extracted from the passed $file.$mimeType
:string
$ttl
:(integer|null)
Time to live$spoiler
:boolean
Whether the message is a spoiler$roundMessage
:boolean
Whether the message should be round$supportsStreaming
:boolean
Whether the video supports streaming$noSound
:boolean
Whether the video has no sound$duration
:(integer|null)
Duration of the video$width
:(integer|null)
Width of the video$height
:(integer|null)
Height of the video$replyMarkup
:(array|null)
Keyboard information.$sendAs
:(integer|string|null)
Peer to send the message as.$scheduleDate
:(integer|null)
Schedule date.$silent
:boolean
Whether to send the message silently, without triggering notifications.$noForwards
:boolean
Whether to disable forwards for this message.$background
:boolean
Send this message as background message$clearDraft
:boolean
Clears the draft field$forceResend
:boolean
Whether to forcefully resend the file, even if its type and name are the same.$updateStickersetsOrder
:bool
$cancellation
:\Amp\Cancellation
Cancellation.
See also:
\danog\MadelineProto\EventHandler\Message
: Represents an incoming or outgoing message.\danog\MadelineProto\EventHandler\Media
: Represents a generic media.\danog\MadelineProto\LocalFile
: Indicates a local file to upload.\danog\MadelineProto\RemoteUrl
: Indicates a remote URL to upload.\danog\MadelineProto\BotApiFileId
: Indicates a bot API file ID to upload using sendDocument, sendPhoto etc…\Amp\ByteStream\ReadableStream
\danog\MadelineProto\ParseMode
: Indicates a parsing mode for text.\Amp\Cancellation
replyGif((\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream) $file, (\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream|null) $thumb = NULL, string $caption = '', \danog\MadelineProto\ParseMode $parseMode = \danog\MadelineProto\ParseMode::TEXT, ?callable $callback = NULL, ?string $fileName = NULL, (integer|null) $ttl = NULL, boolean $spoiler = false, (array|null) $replyMarkup = NULL, (integer|string|null) $sendAs = NULL, (integer|null) $scheduleDate = NULL, boolean $silent = false, boolean $noForwards = false, boolean $background = false, boolean $clearDraft = false, boolean $forceResend = false, ?\Amp\Cancellation $cancellation = NULL): \danog\MadelineProto\EventHandler\Message
Reply a gif.
Please use named arguments to call this method.
Parameters:
$file
:(\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream)
File to upload: can be a message to reuse media present in a message.$thumb
:(\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream|null)
Optional: Thumbnail to upload$caption
:string
Caption of document$parseMode
:\danog\MadelineProto\ParseMode
Text parse mode for the caption$callback
:?callable
$fileName
:?string
Optional file name, if absent will be extracted from the passed $file.$ttl
:(integer|null)
Time to live$spoiler
:boolean
Whether the message is a spoiler$replyMarkup
:(array|null)
Keyboard information.$sendAs
:(integer|string|null)
Peer to send the message as.$scheduleDate
:(integer|null)
Schedule date.$silent
:boolean
Whether to send the message silently, without triggering notifications.$noForwards
:boolean
Whether to disable forwards for this message.$background
:boolean
Send this message as background message$clearDraft
:boolean
Clears the draft field$forceResend
:boolean
Whether to forcefully resend the file, even if its type and name are the same.$cancellation
:?\Amp\Cancellation
Cancellation.
See also:
\danog\MadelineProto\EventHandler\Message
: Represents an incoming or outgoing message.\danog\MadelineProto\EventHandler\Media
: Represents a generic media.\danog\MadelineProto\LocalFile
: Indicates a local file to upload.\danog\MadelineProto\RemoteUrl
: Indicates a remote URL to upload.\danog\MadelineProto\BotApiFileId
: Indicates a bot API file ID to upload using sendDocument, sendPhoto etc…\Amp\ByteStream\ReadableStream
\danog\MadelineProto\ParseMode
: Indicates a parsing mode for text.\Amp\Cancellation
replyAudio((\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream) $file, (\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream|null) $thumb = NULL, string $caption = '', \danog\MadelineProto\ParseMode $parseMode = \danog\MadelineProto\ParseMode::TEXT, ?callable $callback = NULL, ?string $fileName = NULL, ?string $mimeType = NULL, (integer|null) $duration = NULL, (string|null) $title = NULL, (string|null) $performer = NULL, ?int $ttl = NULL, (array|null) $replyMarkup = NULL, (integer|string|null) $sendAs = NULL, (integer|null) $scheduleDate = NULL, boolean $silent = false, boolean $noForwards = false, boolean $background = false, boolean $clearDraft = false, boolean $forceResend = false, ?\Amp\Cancellation $cancellation = NULL): \danog\MadelineProto\EventHandler\Message
Reply an audio.
Please use named arguments to call this method.
Parameters:
$file
:(\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream)
File to upload: can be a message to reuse media present in a message.$thumb
:(\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream|null)
Optional: Thumbnail to upload$caption
:string
Caption of document$parseMode
:\danog\MadelineProto\ParseMode
Text parse mode for the caption$callback
:?callable
$fileName
:?string
Optional file name, if absent will be extracted from the passed $file.$mimeType
:?string
$duration
:(integer|null)
Duration of the audio$title
:(string|null)
Title of the audio$performer
:(string|null)
Performer of the audio$ttl
:?int
$replyMarkup
:(array|null)
Keyboard information.$sendAs
:(integer|string|null)
Peer to send the message as.$scheduleDate
:(integer|null)
Schedule date.$silent
:boolean
Whether to send the message silently, without triggering notifications.$noForwards
:boolean
Whether to disable forwards for this message.$background
:boolean
Send this message as background message$clearDraft
:boolean
Clears the draft field$forceResend
:boolean
Whether to forcefully resend the file, even if its type and name are the same.$cancellation
:?\Amp\Cancellation
Cancellation.
See also:
\danog\MadelineProto\EventHandler\Message
: Represents an incoming or outgoing message.\danog\MadelineProto\EventHandler\Media
: Represents a generic media.\danog\MadelineProto\LocalFile
: Indicates a local file to upload.\danog\MadelineProto\RemoteUrl
: Indicates a remote URL to upload.\danog\MadelineProto\BotApiFileId
: Indicates a bot API file ID to upload using sendDocument, sendPhoto etc…\Amp\ByteStream\ReadableStream
\danog\MadelineProto\ParseMode
: Indicates a parsing mode for text.\Amp\Cancellation
replyVoice((\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream) $file, string $caption = '', \danog\MadelineProto\ParseMode $parseMode = \danog\MadelineProto\ParseMode::TEXT, ?callable $callback = NULL, ?string $fileName = NULL, (integer|null) $ttl = NULL, (integer|null) $duration = NULL, (array|null) $waveform = NULL, (array|null) $replyMarkup = NULL, (integer|string|null) $sendAs = NULL, (integer|null) $scheduleDate = NULL, boolean $silent = false, boolean $noForwards = false, boolean $background = false, boolean $clearDraft = false, boolean $forceResend = false, ?\Amp\Cancellation $cancellation = NULL): \danog\MadelineProto\EventHandler\Message
Reply a voice.
Please use named arguments to call this method.
Parameters:
$file
:(\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream)
File to upload: can be a message to reuse media present in a message.$caption
:string
Caption of document$parseMode
:\danog\MadelineProto\ParseMode
Text parse mode for the caption$callback
:?callable
$fileName
:?string
Optional file name, if absent will be extracted from the passed $file.$ttl
:(integer|null)
Time to live$duration
:(integer|null)
Duration of the voice$waveform
:(array|null)
Waveform of the voice$replyMarkup
:(array|null)
Keyboard information.$sendAs
:(integer|string|null)
Peer to send the message as.$scheduleDate
:(integer|null)
Schedule date.$silent
:boolean
Whether to send the message silently, without triggering notifications.$noForwards
:boolean
Whether to disable forwards for this message.$background
:boolean
Send this message as background message$clearDraft
:boolean
Clears the draft field$forceResend
:boolean
Whether to forcefully resend the file, even if its type and name are the same.$cancellation
:?\Amp\Cancellation
Cancellation.
See also:
\danog\MadelineProto\EventHandler\Message
: Represents an incoming or outgoing message.\danog\MadelineProto\EventHandler\Media
: Represents a generic media.\danog\MadelineProto\LocalFile
: Indicates a local file to upload.\danog\MadelineProto\RemoteUrl
: Indicates a remote URL to upload.\danog\MadelineProto\BotApiFileId
: Indicates a bot API file ID to upload using sendDocument, sendPhoto etc…\Amp\ByteStream\ReadableStream
\danog\MadelineProto\ParseMode
: Indicates a parsing mode for text.\Amp\Cancellation
replyPhoto((\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream) $file, string $caption = '', \danog\MadelineProto\ParseMode $parseMode = \danog\MadelineProto\ParseMode::TEXT, ?callable $callback = NULL, ?string $fileName = NULL, ?int $ttl = NULL, bool $spoiler = false, (array|null) $replyMarkup = NULL, (integer|null) $sendAs = NULL, (integer|null) $scheduleDate = NULL, boolean $silent = false, bool $noForwards = false, boolean $background = false, boolean $clearDraft = false, boolean $updateStickersetsOrder = false, boolean $forceResend = false, \Amp\Cancellation $cancellation = NULL): \danog\MadelineProto\EventHandler\Message
Reply a photo.
Please use named arguments to call this method.
Parameters:
$file
:(\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream)
File to upload: can be a message to reuse media present in a message.$caption
:string
Caption of document$parseMode
:\danog\MadelineProto\ParseMode
Text parse mode for the caption$callback
:?callable
$fileName
:?string
Optional file name, if absent will be extracted from the passed $file.$ttl
:?int
$spoiler
:bool
$replyMarkup
:(array|null)
Keyboard information.$sendAs
:(integer|null)
Peer to send the message as.$scheduleDate
:(integer|null)
Schedule date.$silent
:boolean
Whether to send the message silently, without triggering notifications.$noForwards
:bool
$background
:boolean
Send this message as background message$clearDraft
:boolean
Clears the draft field$updateStickersetsOrder
:boolean
Whether to move used stickersets to top$forceResend
:boolean
Whether to forcefully resend the file, even if its type and name are the same.$cancellation
:\Amp\Cancellation
Cancellation.
See also:
\danog\MadelineProto\EventHandler\Message
: Represents an incoming or outgoing message.\danog\MadelineProto\EventHandler\Media
: Represents a generic media.\danog\MadelineProto\LocalFile
: Indicates a local file to upload.\danog\MadelineProto\RemoteUrl
: Indicates a remote URL to upload.\danog\MadelineProto\BotApiFileId
: Indicates a bot API file ID to upload using sendDocument, sendPhoto etc…\Amp\ByteStream\ReadableStream
\danog\MadelineProto\ParseMode
: Indicates a parsing mode for text.\Amp\Cancellation
replySticker((\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream) $file, string $mimeType, string $emoji = '', ?callable $callback = NULL, ?string $fileName = NULL, ?int $ttl = NULL, (array|null) $replyMarkup = NULL, (integer|null) $sendAs = NULL, (integer|null) $scheduleDate = NULL, boolean $silent = false, boolean $noForwards = false, boolean $background = false, boolean $clearDraft = false, boolean $updateStickersetsOrder = false, boolean $forceResend = false, \Amp\Cancellation $cancellation = NULL): \danog\MadelineProto\EventHandler\Message
Reply a sticker.
Please use named arguments to call this method.
Parameters:
$file
:(\danog\MadelineProto\EventHandler\Message|\danog\MadelineProto\EventHandler\Media|\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\danog\MadelineProto\BotApiFileId|\Amp\ByteStream\ReadableStream)
File to upload: can be a message to reuse media present in a message.$mimeType
:string
$emoji
:string
$callback
:?callable
$fileName
:?string
Optional file name, if absent will be extracted from the passed $file.$ttl
:?int
$replyMarkup
:(array|null)
Keyboard information.$sendAs
:(integer|null)
Peer to send the message as.$scheduleDate
:(integer|null)
Schedule date.$silent
:boolean
Whether to send the message silently, without triggering notifications.$noForwards
:boolean
Whether to disable forwards for this message.$background
:boolean
Send this message as background message$clearDraft
:boolean
Clears the draft field$updateStickersetsOrder
:boolean
Whether to move used stickersets to top$forceResend
:boolean
Whether to forcefully resend the file, even if its type and name are the same.$cancellation
:\Amp\Cancellation
Cancellation.
See also:
\danog\MadelineProto\EventHandler\Message
: Represents an incoming or outgoing message.\danog\MadelineProto\EventHandler\Media
: Represents a generic media.\danog\MadelineProto\LocalFile
: Indicates a local file to upload.\danog\MadelineProto\RemoteUrl
: Indicates a remote URL to upload.\danog\MadelineProto\BotApiFileId
: Indicates a bot API file ID to upload using sendDocument, sendPhoto etc…\Amp\ByteStream\ReadableStream
\Amp\Cancellation
sendText(string $message, \danog\MadelineProto\ParseMode $parseMode = \danog\MadelineProto\ParseMode::TEXT, (array|null) $replyMarkup = NULL, (integer|string|null) $sendAs = NULL, (integer|null) $scheduleDate = NULL, boolean $noWebpage = false, boolean $silent = false, boolean $noForwards = false, boolean $background = false, boolean $clearDraft = false, boolean $updateStickersetsOrder = false, ?\Amp\Cancellation $cancellation = NULL): \danog\MadelineProto\EventHandler\Message
Send a text message.
Parameters:
$message
:string
Message to send$parseMode
:\danog\MadelineProto\ParseMode
Parse mode$replyMarkup
:(array|null)
Keyboard information.$sendAs
:(integer|string|null)
Peer to send the message as.$scheduleDate
:(integer|null)
Schedule date.$noWebpage
:boolean
Set this flag to disable generation of the webpage preview$silent
:boolean
Whether to send the message silently, without triggering notifications.$noForwards
:boolean
Only for bots, disallows further re-forwarding and saving of the messages, even if the destination chat doesn’t have content protection enabled$background
:boolean
Send this message as background message$clearDraft
:boolean
Clears the draft field$updateStickersetsOrder
:boolean
Whether to move used stickersets to top$cancellation
:?\Amp\Cancellation
See also:
\danog\MadelineProto\ParseMode
: Indicates a parsing mode for text.\Amp\Cancellation
\danog\MadelineProto\EventHandler\Message
: Represents an incoming or outgoing message.
block(): bool
Adds the user to the blacklist.
unblock(): bool
Deletes the user from the blacklist.
getStories(): list<\danog\MadelineProto\EventHandler\AbstractStory>
Get user stories.
See also:
setAction(\danog\MadelineProto\EventHandler\Action $action = \danog\MadelineProto\EventHandler\Action\Typing::__set_state(array(]]): bool
Sends a current user typing event (see SendMessageAction for all event types) to a conversation partner or group.
Parameters:
$action
:\danog\MadelineProto\EventHandler\Action
See also:
read(bool $readAll = false): boolean
Mark selected message as read.
Parameters:
$readAll
:bool
Return value: if set, read all messages in current chat.
enableTTL(int<1, max> $seconds = 86400): \danog\MadelineProto\EventHandler\Message\Service\DialogSetTTL
Set maximum Time-To-Live of all messages in the specified chat.
Parameters:
$seconds
:int<1, max>
Automatically delete all messages sent in the chat after this many seconds
See also:
disableTTL(): \danog\MadelineProto\EventHandler\Message\Service\DialogSetTTL
Disable Time-To-Live of all messages in the specified chat.
See also:
enableAutoTranslate(): bool
Show the real-time chat translation popup for a certain chat.
disableAutoTranslate(): bool
Hide the real-time chat translation popup for a certain chat.
Generated by danog/phpdoc