mirror of
https://github.com/muerwre/vk-tg-bot.git
synced 2025-04-25 06:56:40 +07:00
added working message handler
This commit is contained in:
parent
12c8e30a1e
commit
1754092f7c
6 changed files with 77 additions and 39 deletions
21
src/service/vk/handlers/VkEventHandler.ts
Normal file
21
src/service/vk/handlers/VkEventHandler.ts
Normal file
|
@ -0,0 +1,21 @@
|
|||
import { NextMiddleware } from "middleware-io";
|
||||
import { ConfigGroup, GroupInstance } from "../types";
|
||||
import { VkService } from "../index";
|
||||
import { TelegramService } from "../../telegram";
|
||||
|
||||
export abstract class VkEventHandler {
|
||||
public constructor(
|
||||
protected group: ConfigGroup,
|
||||
protected instance: GroupInstance,
|
||||
protected vk: VkService,
|
||||
protected telegram: TelegramService
|
||||
) {}
|
||||
|
||||
public execute: (
|
||||
context: any,
|
||||
next: NextMiddleware
|
||||
) => Promise<void> = async (ctx, next) => {
|
||||
console.log(`vk received unknown event`, ctx);
|
||||
await next();
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue