1
0
Fork 0
mirror of https://github.com/muerwre/vk-tg-bot.git synced 2025-04-25 06:56:40 +07:00

#4 fixed event handling

This commit is contained in:
Fedor Katurov 2021-05-06 18:04:24 +07:00
parent e2457eb8c8
commit 948f5ae67c
9 changed files with 265 additions and 11 deletions

View file

@ -56,7 +56,18 @@ export class VkEventHandler<
return undefined;
}
return await this.db.getEventById(
return await this.db.getEventById(id);
};
/**
* Checks for duplicates
*/
getEventByVkEventId = async (id?: number): Promise<Event | undefined> => {
if (!id) {
return undefined;
}
return await this.db.getEventByVKEventId(
this.type,
id,
this.group.id,