@mtkruto/node 0.1.700 → 0.1.701

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.
@@ -45,6 +45,6 @@ export declare class Composer<C extends {
45
45
  names: string | RegExp | (string | RegExp)[];
46
46
  prefixes: string | string[];
47
47
  }, ...middleware: Middleware<WithFilter<C, "message:text">>[]): Composer<WithFilter<C, "message:text">>;
48
- callbackQuery(data: string | RegExp | (string | RegExp)[]): Composer<WithFilter<C, "callbackQuery:data">>;
49
- inlineQuery(queries: string | RegExp | (string | RegExp)[]): Composer<WithFilter<C, "inlineQuery">>;
48
+ callbackQuery(data: string | RegExp | (string | RegExp)[], ...middleware: Middleware<WithFilter<C, "callbackQuery:data">>[]): Composer<WithFilter<C, "callbackQuery:data">>;
49
+ inlineQuery(queries: string | RegExp | (string | RegExp)[], ...middleware: Middleware<WithFilter<C, "inlineQuery">>[]): Composer<WithFilter<C, "inlineQuery">>;
50
50
  }
@@ -136,7 +136,7 @@ export class Composer {
136
136
  return false;
137
137
  }, ...middleware);
138
138
  }
139
- callbackQuery(data) {
139
+ callbackQuery(data, ...middleware) {
140
140
  const data_ = Array.isArray(data) ? data : [data];
141
141
  return this.on("callbackQuery:data").filter((ctx) => {
142
142
  for (const data of data_) {
@@ -148,9 +148,9 @@ export class Composer {
148
148
  }
149
149
  }
150
150
  return false;
151
- });
151
+ }, ...middleware);
152
152
  }
153
- inlineQuery(queries) {
153
+ inlineQuery(queries, ...middleware) {
154
154
  const queries_ = Array.isArray(queries) ? queries : [queries];
155
155
  return this.on("inlineQuery").filter((ctx) => {
156
156
  for (const query of queries_) {
@@ -162,7 +162,7 @@ export class Composer {
162
162
  }
163
163
  }
164
164
  return false;
165
- });
165
+ }, ...middleware);
166
166
  }
167
167
  }
168
168
  _Composer_handle = new WeakMap(), _Composer_prefixes = new WeakMap();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mtkruto/node",
3
- "version": "0.1.700",
3
+ "version": "0.1.701",
4
4
  "description": "MTKruto for Node.js",
5
5
  "author": "Roj <rojvv@icloud.com>",
6
6
  "repository": {
@@ -45,6 +45,6 @@ export declare class Composer<C extends {
45
45
  names: string | RegExp | (string | RegExp)[];
46
46
  prefixes: string | string[];
47
47
  }, ...middleware: Middleware<WithFilter<C, "message:text">>[]): Composer<WithFilter<C, "message:text">>;
48
- callbackQuery(data: string | RegExp | (string | RegExp)[]): Composer<WithFilter<C, "callbackQuery:data">>;
49
- inlineQuery(queries: string | RegExp | (string | RegExp)[]): Composer<WithFilter<C, "inlineQuery">>;
48
+ callbackQuery(data: string | RegExp | (string | RegExp)[], ...middleware: Middleware<WithFilter<C, "callbackQuery:data">>[]): Composer<WithFilter<C, "callbackQuery:data">>;
49
+ inlineQuery(queries: string | RegExp | (string | RegExp)[], ...middleware: Middleware<WithFilter<C, "inlineQuery">>[]): Composer<WithFilter<C, "inlineQuery">>;
50
50
  }
@@ -142,7 +142,7 @@ class Composer {
142
142
  return false;
143
143
  }, ...middleware);
144
144
  }
145
- callbackQuery(data) {
145
+ callbackQuery(data, ...middleware) {
146
146
  const data_ = Array.isArray(data) ? data : [data];
147
147
  return this.on("callbackQuery:data").filter((ctx) => {
148
148
  for (const data of data_) {
@@ -154,9 +154,9 @@ class Composer {
154
154
  }
155
155
  }
156
156
  return false;
157
- });
157
+ }, ...middleware);
158
158
  }
159
- inlineQuery(queries) {
159
+ inlineQuery(queries, ...middleware) {
160
160
  const queries_ = Array.isArray(queries) ? queries : [queries];
161
161
  return this.on("inlineQuery").filter((ctx) => {
162
162
  for (const query of queries_) {
@@ -168,7 +168,7 @@ class Composer {
168
168
  }
169
169
  }
170
170
  return false;
171
- });
171
+ }, ...middleware);
172
172
  }
173
173
  }
174
174
  exports.Composer = Composer;