teleproto - v1.229.0
    Preparing search index...

    Class DeletedMessage

    Occurs whenever a message is deleted. Note that this event isn't 100% reliable, since Telegram doesn't always notify the clients that a message was deleted.

    Telegram does not send information about where a message was deleted if it occurs in private conversations with other users or in small group chats, because message IDs are unique and you can identify the chat with the message ID alone if you saved it previously.

    teleproto does not save information of where messages occur, so it cannot know in which chat a message was deleted (this will only work in channels, where the channel ID is present).

    This means that the chats: parameter will not work reliably, unless you intend on working with channels and super-groups only.

    client.addEventHandler((event: DeletedMessageEvent) => {
    console.log(`Deleted message IDs: ${event.deletedIds}`);
    if (event.deletedId) {
    console.log(`First deleted: ${event.deletedId}`);
    }
    }, new DeletedMessage({}));

    Hierarchy

    • EventBuilder
      • DeletedMessage
    Index
    • Parameters

      • event: EventCommon | EventCommonSender

      Returns EventCommon | EventCommonSender | undefined

    blacklistChats: boolean
    chats?: string[]
    func?: CallableFunction
    resolved: boolean