wingbot 3.33.1 → 3.33.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/package.json +1 -1
- package/src/Tester.js +6 -5
package/package.json
CHANGED
package/src/Tester.js
CHANGED
|
@@ -460,8 +460,7 @@ class Tester {
|
|
|
460
460
|
* @memberOf Tester
|
|
461
461
|
*/
|
|
462
462
|
async quickReplyText (text) {
|
|
463
|
-
let
|
|
464
|
-
let but = 'has not been found';
|
|
463
|
+
let but = 'has not been found.';
|
|
465
464
|
|
|
466
465
|
if (this.responses.length !== 0) {
|
|
467
466
|
const normalize = (t) => `${t}`.toLocaleLowerCase().replace(/\s+/g, ' ').trim();
|
|
@@ -484,13 +483,15 @@ class Tester {
|
|
|
484
483
|
}
|
|
485
484
|
|
|
486
485
|
if (res.length > 1) {
|
|
487
|
-
but = 'found multiple occurences';
|
|
486
|
+
but = 'found, but there are multiple occurences.';
|
|
488
487
|
}
|
|
489
488
|
|
|
490
|
-
|
|
489
|
+
but += quickReplys.length
|
|
490
|
+
? ` (found: ${quickReplys.map((q) => q.title).filter((q) => !!q).join(', ')})`
|
|
491
|
+
: ' (no quick replies available)';
|
|
491
492
|
}
|
|
492
493
|
|
|
493
|
-
throw new Error(`Quick reply "${text}"
|
|
494
|
+
throw new Error(`Quick reply "${text}" ${but}`);
|
|
494
495
|
}
|
|
495
496
|
|
|
496
497
|
/**
|