aboutsummaryrefslogtreecommitdiff
path: root/src/lib/extensions/discord-akairo
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-12-30 16:55:37 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-12-30 16:55:37 -0500
commit83db032fb91996c926a5d007a9e5fa4abed65871 (patch)
tree28081718636b6c41aea89018504f3f7e4f837903 /src/lib/extensions/discord-akairo
parentf0a9f894575871d498447c5de2b5f0f826b117b7 (diff)
downloadtanzanite-83db032fb91996c926a5d007a9e5fa4abed65871.tar.gz
tanzanite-83db032fb91996c926a5d007a9e5fa4abed65871.tar.bz2
tanzanite-83db032fb91996c926a5d007a9e5fa4abed65871.zip
add timeout command and fix some other moderation commands
Diffstat (limited to 'src/lib/extensions/discord-akairo')
-rw-r--r--src/lib/extensions/discord-akairo/BushClient.ts10
-rw-r--r--src/lib/extensions/discord-akairo/BushClientUtil.ts6
2 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/extensions/discord-akairo/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts
index 706b52a..8cbc6fe 100644
--- a/src/lib/extensions/discord-akairo/BushClient.ts
+++ b/src/lib/extensions/discord-akairo/BushClient.ts
@@ -449,19 +449,19 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re
export interface BushClient extends EventEmitter, PatchedElements {
on<K extends keyof BushClientEvents>(event: K, listener: (...args: BushClientEvents[K]) => Awaitable<void>): this;
- on<S extends string | symbol>(event: Exclude<S, keyof BushClientEvents>, listener: (...args: any[]) => Awaitable<void>): this;
+ // on<S extends string | symbol>(event: Exclude<S, keyof BushClientEvents>, listener: (...args: any[]) => Awaitable<void>): this;
once<K extends keyof BushClientEvents>(event: K, listener: (...args: BushClientEvents[K]) => Awaitable<void>): this;
- once<S extends string | symbol>(event: Exclude<S, keyof BushClientEvents>, listener: (...args: any[]) => Awaitable<void>): this;
+ // once<S extends string | symbol>(event: Exclude<S, keyof BushClientEvents>, listener: (...args: any[]) => Awaitable<void>): this;
emit<K extends keyof BushClientEvents>(event: K, ...args: BushClientEvents[K]): boolean;
- emit<S extends string | symbol>(event: Exclude<S, keyof BushClientEvents>, ...args: unknown[]): boolean;
+ // emit<S extends string | symbol>(event: Exclude<S, keyof BushClientEvents>, ...args: unknown[]): boolean;
off<K extends keyof BushClientEvents>(event: K, listener: (...args: BushClientEvents[K]) => Awaitable<void>): this;
- off<S extends string | symbol>(event: Exclude<S, keyof BushClientEvents>, listener: (...args: any[]) => Awaitable<void>): this;
+ // off<S extends string | symbol>(event: Exclude<S, keyof BushClientEvents>, listener: (...args: any[]) => Awaitable<void>): this;
removeAllListeners<K extends keyof BushClientEvents>(event?: K): this;
- removeAllListeners<S extends string | symbol>(event?: Exclude<S, keyof BushClientEvents>): this;
+ // removeAllListeners<S extends string | symbol>(event?: Exclude<S, keyof BushClientEvents>): this;
}
export interface BushStats {
diff --git a/src/lib/extensions/discord-akairo/BushClientUtil.ts b/src/lib/extensions/discord-akairo/BushClientUtil.ts
index f20a53e..30cc83f 100644
--- a/src/lib/extensions/discord-akairo/BushClientUtil.ts
+++ b/src/lib/extensions/discord-akairo/BushClientUtil.ts
@@ -515,11 +515,11 @@ export class BushClientUtil extends ClientUtil {
// in the beginning of the argument
let contentWithoutTime = ` ${content}`;
- for (const unit in BushConstants.TimeUnits) {
- const regex = BushConstants.TimeUnits[unit as keyof typeof BushConstants.TimeUnits].match;
+ for (const unit in BushConstants.timeUnits) {
+ const regex = BushConstants.timeUnits[unit as keyof typeof BushConstants.timeUnits].match;
const match = regex.exec(contentWithoutTime);
const value = Number(match?.groups?.[unit]);
- if (!isNaN(value)) duration! += value * BushConstants.TimeUnits[unit as keyof typeof BushConstants.TimeUnits].value;
+ if (!isNaN(value)) duration! += value * BushConstants.timeUnits[unit as keyof typeof BushConstants.timeUnits].value;
if (remove) contentWithoutTime = contentWithoutTime.replace(regex, '');
}