diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-26 18:47:13 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-26 18:47:13 -0400 |
commit | 80d5b5b11ae261945dc725a0a80115922003afcf (patch) | |
tree | 16c9f251b4d53456b4b5340c0203d35fd5870859 /src/commands/moderation | |
parent | cca0b7a03bcd61af12b7f9bff51276f6c70beeb3 (diff) | |
download | tanzanite-80d5b5b11ae261945dc725a0a80115922003afcf.tar.gz tanzanite-80d5b5b11ae261945dc725a0a80115922003afcf.tar.bz2 tanzanite-80d5b5b11ae261945dc725a0a80115922003afcf.zip |
refactor: this.client -> client
Diffstat (limited to 'src/commands/moderation')
-rw-r--r-- | src/commands/moderation/ban.ts | 2 | ||||
-rw-r--r-- | src/commands/moderation/mute.ts | 2 | ||||
-rw-r--r-- | src/commands/moderation/role.ts | 2 | ||||
-rw-r--r-- | src/commands/moderation/slowmode.ts | 2 | ||||
-rw-r--r-- | src/commands/moderation/unban.ts | 2 |
5 files changed, 5 insertions, 5 deletions
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<unknown> { 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<unknown> { 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, |