Link Search Menu Expand Document


Back to index

Author: Daniil Gentili

A member left the chat or channel.


  • $left: int ID of the user that left the channel
  • $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:


__construct(\danog\MadelineProto\MTProto $API, array $rawMessage, array $info, int $left)


  • $API: \danog\MadelineProto\MTProto
  • $rawMessage: array
  • $info: array
  • $left: int

See also:

  • \danog\MadelineProto\MTProto

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.


  • $class: class-string<\T> Only return a reply if it is of the specified type, return null otherwise.

See also:

  • \T

delete(bool $revoke = true): void

Delete the message.


  • $revoke: bool 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, int|null $sendAs = NULL, int|null $scheduleDate = NULL, bool $noWebpage = false, bool $silent = false, bool $noForwards = false, bool $background = false, bool $clearDraft = false, bool $updateStickersetsOrder = false): \danog\MadelineProto\EventHandler\Message

Reply to the message.


  • $message: string Message to send
  • $parseMode: \danog\MadelineProto\ParseMode Parse mode
  • $replyMarkup: array|null Keyboard information.
  • $sendAs: int|null Peer to send the message as.
  • $scheduleDate: int|null Schedule date.
  • $noWebpage: bool Set this flag to disable generation of the webpage preview
  • $silent: bool Whether to send the message silently, without triggering notifications.
  • $noForwards: bool
  • $background: bool Send this message as background message
  • $clearDraft: bool Clears the draft field
  • $updateStickersetsOrder: bool Whether to move used stickersets to top

See also:

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.


  • $action: \danog\MadelineProto\EventHandler\Action

See also:

read(bool $readAll = false): \bool if set, read all messages in current chat.

Mark selected message as read.


  • $readAll: bool

Return value: if set, read all messages in current chat.

enableTTL(int $seconds = 86400): \danog\MadelineProto\EventHandler\Message\Service\DialogSetTTL

Set maximum Time-To-Live of all messages in the specified chat.


  • $seconds: int 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:

Generated by danog/phpdoc