Occurs whenever an album (multiple grouped messages with media) arrive.
example
// Albums are basically a list of messages. so event is a list asyncfunctionlistenForAlbums(event: AlbumEvent) { constmessages = event.messages; for (constmessageofmessages){ 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, newAlbum({}));
Occurs whenever an album (multiple grouped messages with media) arrive.