UNPKG

el-bot

Version:

A quick qq bot framework for mirai.

22 lines (16 loc) 499 B
import type { ElConfig } from '../config' import { Injectable, Logger, OnModuleInit } from '@nestjs/common' import { loadConfig } from 'c12' import { Bot } from '../bot' @Injectable() export class ElBotService implements OnModuleInit { public bot: Bot | undefined async onModuleInit() { const { config: elConfig } = await loadConfig<ElConfig>({ configFile: 'el-bot.config', }) this.bot = new Bot(elConfig) // await this.bot.start() Logger.debug('Bot start') } }