aboutsummaryrefslogtreecommitdiff
path: root/src/lib/extensions/discord-akairo
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-07 16:12:28 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-07 16:12:28 -0500
commitb4d6c2c94d1fb3f6646503834d5cecd9d68d113a (patch)
tree5ab012e61b1c497729b8e9a5beb54fb06e5cd1c8 /src/lib/extensions/discord-akairo
parentdb68c02e9d84322f729c17afd9d293d449238ca4 (diff)
downloadtanzanite-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.ts21
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.
*/