Skip to content

Instantly share code, notes, and snippets.

View mannguyen0107's full-sized avatar

Man Nguyen mannguyen0107

  • Quant Edge
  • Hanoi, Vietnam
View GitHub Profile
@mannguyen0107
mannguyen0107 / main.ts
Created January 3, 2022 14:25
Gramjs album event handler with download photo
albumEventHandler = async (event: AlbumEvent) => {
const messages = event.messages;
const chat = (await messages[0].getChat()) as Api.Channel;
const chatId = messages[0].chatId.toString();
const noForwards = chat.noforwards;
await this.sendAlbumToForwardChannel(messages, chatId, noForwards);
};
sendAlbumToForwardChannel = async (
messages: Api.Message[],