Options
All
  • Public
  • Public/Protected
  • All
Menu

Occurs whenever an album (multiple grouped messages with media) arrive.

example
// Albums are basically a list of messages. so event is a list
async function listenForAlbums(event: AlbumEvent) {
const messages = event.messages;
for (const message of messages){
console.log("Caption is",message.text);
console.log("Message id is",message.id);
console.log("Chat id is",message.chatId);
}
}
// adds an event handler for new messages
client.addEventHandler(listenForAlbums, new Album({}));

Hierarchy

Index

Properties

func?: ((event: Album) => boolean)

Type declaration

    • Parameters

      Returns boolean

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

Constructors

Methods

  • build(update: TypeUpdate, dispatch?: CallableFunction): any

Generated using TypeDoc