alemonjs 2.1.61 → 2.1.62

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.
@@ -58,6 +58,10 @@ const createRouteProcessChildren = (valueEvent, select, nextCycle, callHandler)
58
58
  return;
59
59
  }
60
60
  const node = nodes[idx - 1];
61
+ if (node.platform && node.platform !== valueEvent.platform) {
62
+ void nextNode();
63
+ return;
64
+ }
61
65
  if (node?.selects) {
62
66
  const selects = Array.isArray(node.selects) ? node.selects : [node.selects];
63
67
  if (!selects.includes(select)) {
@@ -400,7 +400,7 @@ class Format {
400
400
  this.#data.push({
401
401
  type: 'Select',
402
402
  value: args[0],
403
- options: (args[1] ?? {})
403
+ options: args[1] ?? {}
404
404
  });
405
405
  }
406
406
  return this;
@@ -34,6 +34,7 @@ export type OnDataFormatFunc = (...data: DataEnums[]) => DataEnums[];
34
34
  export type OnGroupItem<C = any, T extends EventKeys = EventKeys> = OnResponseValue<C, T> | OnMiddlewareValue<C, T>;
35
35
  export type OnGroupFunc = <C, T extends EventKeys, TFirst extends OnGroupItem<C, T>>(...calls: [TFirst, ...Array<TFirst>]) => TFirst;
36
36
  export type ResponseRoute = {
37
+ platform?: string;
37
38
  regular?: RegExp;
38
39
  prefix?: string;
39
40
  exact?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alemonjs",
3
- "version": "2.1.61",
3
+ "version": "2.1.62",
4
4
  "description": "bot script",
5
5
  "author": "lemonade",
6
6
  "license": "MIT",