ahegao 1.69.249 → 1.69.250
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/types/classes.d.ts +1 -1
- package/dist/types/classes.js +2 -2
- package/package.json +1 -1
package/dist/types/classes.d.ts
CHANGED
|
@@ -220,7 +220,7 @@ export declare class RegexAction {
|
|
|
220
220
|
readonly actions: StringRegexAction[];
|
|
221
221
|
constructor(regex: RegExp, action: StringRegexAction | StringRegexAction[], await?: boolean, chance?: number);
|
|
222
222
|
onActionError(error: any, match?: RegExpExecArray | RegExpMatchArray): void;
|
|
223
|
-
|
|
223
|
+
tryChance(): boolean;
|
|
224
224
|
run(input: string): Promise<number>;
|
|
225
225
|
}
|
|
226
226
|
export declare class Promiser {
|
package/dist/types/classes.js
CHANGED
|
@@ -923,12 +923,12 @@ class RegexAction {
|
|
|
923
923
|
onActionError(error, match) {
|
|
924
924
|
(0, util_1.print)(`Error in RegexAction ${this} for regex ${this.regex}${match ? `, match: ${match}` : ""}:\n${error}`);
|
|
925
925
|
}
|
|
926
|
-
|
|
926
|
+
tryChance() {
|
|
927
927
|
return (0, util_1.randomBoolean)(this.chance);
|
|
928
928
|
}
|
|
929
929
|
async run(input) {
|
|
930
930
|
var _a;
|
|
931
|
-
if (!this.
|
|
931
|
+
if (!this.tryChance()) {
|
|
932
932
|
return -1;
|
|
933
933
|
}
|
|
934
934
|
let matchCount = 0;
|