MadelineProto was updated (8.0.0-beta107)!
Features:
- Add getPeriodicLoops function to get all periodic loops created by Cron attribtues
- Add isReply bound method
- Add exception logging in the browser
Fixes:
- Relax dl.php verification for getDownloadLink
- Made more fixes to photo bot API conversion
- Fix functions.php plugin inclusion
Also here's a more detailed list of the properties and bound methods of the new simple event handler API:
- $message->message: string Content of the message
- $message->fwdInfo: ?
ForwardedInfo Info about a forwarded message
- $message->command: ?string Bot command (if present)
- $message->commandType: ?
CommandType Bot command type (if present)
- $message->commandArgs: list Bot command arguments (if present)
- $message->protected: bool Whether this message is protected
- $message->matches: list Regex matches, if a filter regex is present
- $message->fromScheduled: bool Whether this message is a sent scheduled message
- $message->viaBotId: ?int If the message was generated by an inline query, ID of the bot that generated it
- $message->editDate: ?int Last edit date of the message
- $message->keyboard:
InlineKeyboard|
ReplyKeyboard|null Inline or reply keyboard.
- $message->imported: bool Whether this message was imported from a foreign chat service
- $message->psaType: ?string For Public Service Announcement messages, the PSA type
- $message->nextSent: ?self
@readonly For sent messages, contains the next message in the chain if the original message had to be split.
- $message->id: int Message ID
- $message->out: bool Whether the message is outgoing
- $message->chatId: int ID of the chat where the message was sent
- $message->senderId: int ID of the sender of the message
- $message->replyToMsgId: ?int ID of the message to which this message is replying
- $message->date: int When was the message sent
- $message->topicId: ?int ID of the forum topic where the message was sent
- $message->threadId: ?int ID of the message thread where the message was sent
- $message->replyToScheduled: bool Whether this is a reply to a scheduled message
- $message->mentioned: bool Whether we were mentioned in this message
- $message->silent: bool Whether this message was sent without any notification (silently)
- $message->ttlPeriod: ?int Time-to-live of the message
- $message->media:
Media|null Attached media.
- $message->media->botApiFileId: Bot API file ID of media.
- $message->media->botApiFileUniqueId: Bot API unique file ID of media.
- $message->media->fileName, fileExt, creationDate, size, ...: see the full list of properties by clicking on the
documentation for all classes in the \danog\MadelineProto\EventHandler\Media namespace!
Methods:
- $message->getHTML(bool $allowTelegramTags = false): string: Get an HTML version of the message. $allowTelegramTags specifies whether to allow telegram-specific tags like tg-spoiler, tg-emoji, mention links and so on…
- $message->getReply(): ?self: Get replied-to message. May return null if the replied-to message was deleted.
- $message->delete(bool $revoke = true): void: Delete the message. $revoke is true by default, if false it deletes the message on just one side of the chat.
- $message->reply(string $message, ParseMode $parseMode, ...): \danog\MadelineProto\EventHandler\Message: Reply to the message, see
the documentation for more info on the parameters!
Also, you can now more easily press inline buttons using the new simple keyboard API:
- $message->keyboard->press(string $label, bool $waitForResult): Presses the first keyboard button with the specified label.
- $message->keyboard->pressByCoordinates(int $row, int $column, bool $waitForResult): Presses button at the specified keyboard coordinates.
In both cases, if $waitForResult is true, waits for a result from the bot before returning.