This commit is contained in:
@ -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 插件加载成功')
|
||||
}
|
||||
|
Reference in New Issue
Block a user