diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-01-07 16:12:28 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-01-07 16:12:28 -0500 |
commit | b4d6c2c94d1fb3f6646503834d5cecd9d68d113a (patch) | |
tree | 5ab012e61b1c497729b8e9a5beb54fb06e5cd1c8 /src/lib/extensions/discord-akairo | |
parent | db68c02e9d84322f729c17afd9d293d449238ca4 (diff) | |
download | tanzanite-b4d6c2c94d1fb3f6646503834d5cecd9d68d113a.tar.gz tanzanite-b4d6c2c94d1fb3f6646503834d5cecd9d68d113a.tar.bz2 tanzanite-b4d6c2c94d1fb3f6646503834d5cecd9d68d113a.zip |
sync punishments
Diffstat (limited to 'src/lib/extensions/discord-akairo')
-rw-r--r-- | src/lib/extensions/discord-akairo/BushClientUtil.ts | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/lib/extensions/discord-akairo/BushClientUtil.ts b/src/lib/extensions/discord-akairo/BushClientUtil.ts index d7416bb..9a8e408 100644 --- a/src/lib/extensions/discord-akairo/BushClientUtil.ts +++ b/src/lib/extensions/discord-akairo/BushClientUtil.ts @@ -682,11 +682,11 @@ export class BushClientUtil extends ClientUtil { .filter( (p, i, arr) => typeof Object.getOwnPropertyDescriptor(obj_, p)?.['get'] !== 'function' && // ignore getters - typeof Object.getOwnPropertyDescriptor(obj_, p)?.['set'] !== 'function' && // ignore setters - typeof obj_[p] === 'function' && //only the methods - p !== 'constructor' && //not the constructor - (i == 0 || p !== arr[i - 1]) && //not overriding in this prototype - props.indexOf(p) === -1 //not overridden in a child + typeof Object.getOwnPropertyDescriptor(obj_, p)?.['set'] !== 'function' && // ignore setters + typeof obj_[p] === 'function' && // only the methods + p !== 'constructor' && // not the constructor + (i == 0 || p !== arr[i - 1]) && // not overriding in this prototype + props.indexOf(p) === -1 // not overridden in a child ); const reg = /\(([\s\S]*?)\)/; @@ -705,8 +705,8 @@ export class BushClientUtil extends ClientUtil { ) ); } while ( - (obj_ = Object.getPrototypeOf(obj_)) && //walk-up the prototype chain - Object.getPrototypeOf(obj_) //not the the Object prototype methods (hasOwnProperty, etc...) + (obj_ = Object.getPrototypeOf(obj_)) && // walk-up the prototype chain + Object.getPrototypeOf(obj_) // not the the Object prototype methods (hasOwnProperty, etc...) ); return props.join('\n'); @@ -801,8 +801,6 @@ export class BushClientUtil extends ClientUtil { : message.util.parsed?.prefix ?? client.config.prefix; } - // public retryAsync<P extends [], R>(func: (...args: P) => R, repeatFreq: number, numRepeat: number): R | Promise<null> {} - /** * Recursively apply provided options operations on object * and all of the object properties that are either object or function. @@ -849,6 +847,11 @@ export class BushClientUtil extends ClientUtil { return deepLock; } + public get time(): Record<keyof typeof client.constants.timeUnits, number> { + const values = Object.entries(client.constants.timeUnits).map(([key, value]) => [key, value.value]); + return Object.fromEntries(values); + } + /** * A wrapper for the Argument class that adds custom typings. */ |