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:
parent
6230217741
commit
2a08ec9f86
3 changed files with 150 additions and 2 deletions
|
@ -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}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue