2023-03-04 14:30:13 +08:00
|
|
|
import './config/init.js'
|
|
|
|
import ListenerLoader from './listener/loader.js'
|
|
|
|
import { Client } from 'icqq'
|
|
|
|
import cfg from './config/config.js'
|
|
|
|
|
|
|
|
export default class Yunzai extends Client {
|
|
|
|
// eslint-disable-next-line no-useless-constructor
|
2023-03-11 09:35:53 +08:00
|
|
|
constructor (conf) {
|
|
|
|
super(conf)
|
2023-03-04 14:30:13 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/** 登录机器人 */
|
|
|
|
static async run () {
|
2023-03-04 15:24:28 +08:00
|
|
|
const bot = new Yunzai(cfg.bot)
|
2023-03-04 14:30:13 +08:00
|
|
|
/** 加载icqq事件监听 */
|
|
|
|
await ListenerLoader.load(bot)
|
2023-03-04 15:24:28 +08:00
|
|
|
await bot.login(cfg.qq, cfg.pwd)
|
2023-07-30 11:05:48 +08:00
|
|
|
bot[bot.uin] = bot
|
2023-03-04 14:30:13 +08:00
|
|
|
return bot
|
|
|
|
}
|
|
|
|
}
|