mirror of
https://github.com/muerwre/vk-tg-bot.git
synced 2025-04-25 06:56:40 +07:00
#4 working likes on posts
This commit is contained in:
parent
a6e6209770
commit
5535a36cb8
6 changed files with 190 additions and 59 deletions
|
@ -51,12 +51,35 @@ export class VkEventHandler<
|
|||
/**
|
||||
* Checks for duplicates
|
||||
*/
|
||||
getEvent = async (id?: number): Promise<Event | undefined> => {
|
||||
getEventById = async (id?: number): Promise<Event | undefined> => {
|
||||
if (!id) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return await this.db.getEvent(this.type, id, this.group.id, this.channel);
|
||||
return await this.db.getEventById(
|
||||
this.type,
|
||||
id,
|
||||
this.group.id,
|
||||
this.channel
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Checks for duplicates
|
||||
*/
|
||||
getEventByTgMessageId = async (
|
||||
tgMessageId?: number
|
||||
): Promise<Event | undefined> => {
|
||||
if (!tgMessageId) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return await this.db.getEventByMessageId(
|
||||
this.type,
|
||||
tgMessageId,
|
||||
this.group.id,
|
||||
this.channel
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue