From 80d5b5b11ae261945dc725a0a80115922003afcf Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Mon, 26 Jul 2021 18:47:13 -0400 Subject: refactor: this.client -> client --- src/commands/moderation/ban.ts | 2 +- src/commands/moderation/mute.ts | 2 +- src/commands/moderation/role.ts | 2 +- src/commands/moderation/slowmode.ts | 2 +- src/commands/moderation/unban.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/commands/moderation') diff --git a/src/commands/moderation/ban.ts b/src/commands/moderation/ban.ts index 27a0ffc..3736165 100644 --- a/src/commands/moderation/ban.ts +++ b/src/commands/moderation/ban.ts @@ -105,7 +105,7 @@ export default class BanCommand extends BushCommand { if (reason) { time = typeof reason === 'string' - ? await Argument.cast('duration', this.client.commandHandler.resolver, message as BushMessage, reason) + ? await Argument.cast('duration', client.commandHandler.resolver, message as BushMessage, reason) : reason.duration; } const parsedReason = reason.contentWithoutTime; diff --git a/src/commands/moderation/mute.ts b/src/commands/moderation/mute.ts index 0b10ee1..779f60d 100644 --- a/src/commands/moderation/mute.ts +++ b/src/commands/moderation/mute.ts @@ -75,7 +75,7 @@ export default class MuteCommand extends BushCommand { if (reason) { time = typeof reason === 'string' - ? await Argument.cast('duration', this.client.commandHandler.resolver, message as BushMessage, reason) + ? await Argument.cast('duration', client.commandHandler.resolver, message as BushMessage, reason) : reason.duration; } const parsedReason = reason.contentWithoutTime; diff --git a/src/commands/moderation/role.ts b/src/commands/moderation/role.ts index 63fb3a2..fe8724d 100644 --- a/src/commands/moderation/role.ts +++ b/src/commands/moderation/role.ts @@ -95,7 +95,7 @@ export default class RoleCommand extends BushCommand { { action, user, role, duration }: { action: 'add' | 'remove'; user: BushGuildMember; role: BushRole; duration: number } ): Promise { if (!message.member.permissions.has('MANAGE_ROLES')) { - const mappings = this.client.consts.mappings; + const mappings = client.consts.mappings; let mappedRole: { name: string; id: string }; for (let i = 0; i < mappings.roleMap.length; i++) { const a = mappings.roleMap[i]; diff --git a/src/commands/moderation/slowmode.ts b/src/commands/moderation/slowmode.ts index 019e545..f9ffbab 100644 --- a/src/commands/moderation/slowmode.ts +++ b/src/commands/moderation/slowmode.ts @@ -61,7 +61,7 @@ export default class SlowModeCommand extends BushCommand { if (length) { length = typeof length === 'string' && !['off', 'none', 'disable'].includes(length) - ? await Argument.cast('duration', this.client.commandHandler.resolver, message as BushMessage, length) + ? await Argument.cast('duration', client.commandHandler.resolver, message as BushMessage, length) : length; } diff --git a/src/commands/moderation/unban.ts b/src/commands/moderation/unban.ts index 26878d9..8aa9ef0 100644 --- a/src/commands/moderation/unban.ts +++ b/src/commands/moderation/unban.ts @@ -53,7 +53,7 @@ export default class UnbanCommand extends BushCommand { } async exec(message: BushMessage | BushSlashMessage, { user, reason }: { user: User; reason?: string }): Promise { if (!(user instanceof User)) { - user = util.resolveUser(user, this.client.users.cache); + user = util.resolveUser(user, client.users.cache); } const responseCode = await message.guild.unban({ user, -- cgit