koishi-plugin-ccb-plus 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.js +4 -2
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -279,8 +279,10 @@ function apply(ctx, config) {
279
279
  const checkResult = checkGroupCommand(session);
280
280
  if (checkResult) return checkResult;
281
281
  const senderId = session.userId;
282
- if (options.off || options.on) {
283
- const isOff = !!options.off;
282
+ const hasOff = "off" in options;
283
+ const hasOn = "on" in options;
284
+ if (hasOff || hasOn) {
285
+ const isOff = hasOff;
284
286
  const val = isOff ? options.off : options.on;
285
287
  if (val === true) {
286
288
  const now2 = Date.now();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-ccb-plus",
3
3
  "description": "Koishi插件,与群友发生ccb行为。(移植自astrbot_plugin_ccb_plus)",
4
- "version": "0.2.3",
4
+ "version": "0.2.4",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [