/
Dante
/
node-core
Обзор
Документация
Войти
/
Dante
/
node-core
Код
Запросы
0
Задачи
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
node_modules/lib-git/src/index.ts
21 строка
588 B
Александр Данилюк
add
24 сен 2024, 12:59
24 сен 2024, 12:59
9eaeea8
Код
Авторство
О чём код?
import EventEmitter from "node:events"; import { TelegramBot } from "./telegram-bot.class"; const packageInfo = require('../package.json'); export class Module { private bot: TelegramBot; async onInit(config: {telegramBotToken: string}, eventBus: EventEmitter): Promise<void> { this.bot = new TelegramBot(config, eventBus); } async run(): Promise<void> { this.bot.startBot() } async info(): Promise<{name: string, version: string}> { return Promise.resolve({name: packageInfo.name, version: packageInfo.version}); } async onDestroy(): Promise<void> {} }