@effect-ak/tg-bot-client 0.4.1 → 0.4.2
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.
- package/dist/index.js +11 -1
- package/dist/index.mjs +11 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -264,7 +264,12 @@ var fetchAndHandle = ({ state, settings, handlers }) => Micro2.gen(function* ()
|
|
|
264
264
|
concurrency: 10
|
|
265
265
|
}
|
|
266
266
|
).pipe(
|
|
267
|
-
Micro2.andThen((
|
|
267
|
+
Micro2.andThen((batchResult) => {
|
|
268
|
+
if (settings.log_level == "debug") {
|
|
269
|
+
console.debug("handle batch result", batchResult);
|
|
270
|
+
}
|
|
271
|
+
return !batchResult.every((error) => error == null);
|
|
272
|
+
})
|
|
268
273
|
);
|
|
269
274
|
if (lastUpdateId) {
|
|
270
275
|
yield* execute("get_updates", {
|
|
@@ -327,6 +332,11 @@ var handleUpdate = (updateObject, settings, handlers) => Micro2.gen(function* ()
|
|
|
327
332
|
}),
|
|
328
333
|
Micro2.catchAll((error) => {
|
|
329
334
|
handleUpdateError = error;
|
|
335
|
+
console.log("error", {
|
|
336
|
+
updateId: updateObject.update_id,
|
|
337
|
+
updateKey: Object.keys(update).at(1),
|
|
338
|
+
name: error._tag
|
|
339
|
+
});
|
|
330
340
|
return Micro2.succeed(
|
|
331
341
|
BotResponse.make({
|
|
332
342
|
type: "message",
|
package/dist/index.mjs
CHANGED
|
@@ -218,7 +218,12 @@ var fetchAndHandle = ({ state, settings, handlers }) => Micro2.gen(function* ()
|
|
|
218
218
|
concurrency: 10
|
|
219
219
|
}
|
|
220
220
|
).pipe(
|
|
221
|
-
Micro2.andThen((
|
|
221
|
+
Micro2.andThen((batchResult) => {
|
|
222
|
+
if (settings.log_level == "debug") {
|
|
223
|
+
console.debug("handle batch result", batchResult);
|
|
224
|
+
}
|
|
225
|
+
return !batchResult.every((error) => error == null);
|
|
226
|
+
})
|
|
222
227
|
);
|
|
223
228
|
if (lastUpdateId) {
|
|
224
229
|
yield* execute("get_updates", {
|
|
@@ -281,6 +286,11 @@ var handleUpdate = (updateObject, settings, handlers) => Micro2.gen(function* ()
|
|
|
281
286
|
}),
|
|
282
287
|
Micro2.catchAll((error) => {
|
|
283
288
|
handleUpdateError = error;
|
|
289
|
+
console.log("error", {
|
|
290
|
+
updateId: updateObject.update_id,
|
|
291
|
+
updateKey: Object.keys(update).at(1),
|
|
292
|
+
name: error._tag
|
|
293
|
+
});
|
|
284
294
|
return Micro2.succeed(
|
|
285
295
|
BotResponse.make({
|
|
286
296
|
type: "message",
|