test
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
mol
2023-12-14 10:26:11 +08:00
parent 83964b678d
commit 4a86ca162a
2 changed files with 4 additions and 6 deletions

View File

@ -56,7 +56,7 @@ export default class CreateBot {
mountPlugin(plugins) {
for (let plugin of plugins) {
plugin(this.bot, this.queue);
plugin(this);
}
}
}

View File

@ -7,7 +7,6 @@ import logger from '#root/utils/logger.js'
const { Middleware } = pkg;
const cookCommand = command.cook;
let Bot;
let Queue;
const commandHandle = {
random: randomCook,
@ -28,12 +27,12 @@ function randomCook(text, data) {
}
function cookInit() {
Bot.on(
Bot.bot.on(
'GroupMessage',
new Middleware().groupFilter(cookSubs.groups).done(dealCommon),
);
Bot.on(
Bot.bot.on(
'FriendMessage',
new Middleware().friendFilter(cookSubs.users).done(dealCommon),
);
@ -53,9 +52,8 @@ function dealCommon(data) {
}
}
export default function install(bot, queue) {
export default function install(bot) {
Bot = bot;
Queue = queue;
cookInit();
logger('cook 插件加载成功')
}