1
0
Fork 0
mirror of https://github.com/muerwre/vk-tg-bot.git synced 2025-04-26 07:26:41 +07:00

add roll command

This commit is contained in:
Fedor Katurov 2023-12-30 17:02:36 +07:00
parent 6230217741
commit 2a08ec9f86
3 changed files with 150 additions and 2 deletions

View file

@ -6,6 +6,7 @@ import { TelegramApi } from "./api/telegram";
import { HttpApi } from "./api/http";
import { PostgresDB } from "./service/db/postgres";
import { PgTransport } from "./service/db/postgres/loggerTransport";
import { roll } from "./commands/roll";
async function main() {
try {
@ -29,9 +30,11 @@ async function main() {
await httpApi.listen();
await telegramApi.probe();
telegram.hears(/\/roll(.*)/, roll);
logger.info("bot successfully started");
} catch (e) {
logger.error(`FATAL EXCEPTION ${e.message}`);
logger.error(`FATAL EXCEPTION ${e}`);
}
}