koishi-plugin-common
Advanced tools
Comparing version 3.0.0-beta.4 to 3.0.0-beta.5
@@ -24,2 +24,3 @@ "use strict"; | ||
let capture; | ||
// eslint-disable-next-line no-cond-assign | ||
while (capture = imageRE.exec(message)) { | ||
@@ -26,0 +27,0 @@ const [text, _, url] = capture; |
@@ -22,2 +22,3 @@ "use strict"; | ||
const { blackList = [], respondents = [], throttle, welcome = defaultMessage } = options; | ||
// eslint-disable-next-line @typescript-eslint/no-unused-expressions | ||
blackList.length && ctx.prependMiddleware((session, next) => { | ||
@@ -30,2 +31,3 @@ for (const word of blackList) { | ||
}); | ||
// eslint-disable-next-line @typescript-eslint/no-unused-expressions | ||
respondents.length && ctx.middleware((session, next) => { | ||
@@ -32,0 +34,0 @@ const message = koishi_utils_1.simplify(session.message); |
@@ -34,3 +34,3 @@ "use strict"; | ||
const check = (handle) => { | ||
const text = handle && handle(state, message, userId); | ||
const text = handle === null || handle === void 0 ? void 0 : handle(state, message, userId); | ||
return text && next(() => { | ||
@@ -37,0 +37,0 @@ ctx.emit('repeater', session, state); |
{ | ||
"name": "koishi-plugin-common", | ||
"description": "Common plugins for Koishi", | ||
"version": "3.0.0-beta.4", | ||
"version": "3.0.0-beta.5", | ||
"main": "dist/index.js", | ||
@@ -34,9 +34,9 @@ "typings": "dist/index.d.ts", | ||
"devDependencies": { | ||
"koishi-test-utils": "^4.0.0-beta.1" | ||
"koishi-test-utils": "^4.0.0-beta.2" | ||
}, | ||
"dependencies": { | ||
"axios": "^0.19.2", | ||
"koishi-core": "^2.0.0-beta.4", | ||
"koishi-core": "^2.0.0-beta.5", | ||
"koishi-utils": "^2.1.2" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
65324
842
Updatedkoishi-core@^2.0.0-beta.5