aboutsummaryrefslogtreecommitdiff
path: root/src/inhibitors/command
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-06-17 20:03:05 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-06-17 20:03:05 -0400
commite1c613829950a534d9f45c00a033b83575be3b3c (patch)
tree2de1e5231217211ae4087c46cc74dc46c584507a /src/inhibitors/command
parent0e87bbd3940d89defcb04926587b35c8f4d1947f (diff)
downloadtanzanite-e1c613829950a534d9f45c00a033b83575be3b3c.tar.gz
tanzanite-e1c613829950a534d9f45c00a033b83575be3b3c.tar.bz2
tanzanite-e1c613829950a534d9f45c00a033b83575be3b3c.zip
remove global client variable
Diffstat (limited to 'src/inhibitors/command')
-rw-r--r--src/inhibitors/command/dm.ts2
-rw-r--r--src/inhibitors/command/globalDisabledCommand.ts4
-rw-r--r--src/inhibitors/command/guild.ts2
-rw-r--r--src/inhibitors/command/guildDisabledCommand.ts2
-rw-r--r--src/inhibitors/command/nsfw.ts2
-rw-r--r--src/inhibitors/command/owner.ts4
-rw-r--r--src/inhibitors/command/restrictedChannel.ts2
-rw-r--r--src/inhibitors/command/restrictedGuild.ts2
-rw-r--r--src/inhibitors/command/superUser.ts4
9 files changed, 12 insertions, 12 deletions
diff --git a/src/inhibitors/command/dm.ts b/src/inhibitors/command/dm.ts
index 1fc43c6..5516c81 100644
--- a/src/inhibitors/command/dm.ts
+++ b/src/inhibitors/command/dm.ts
@@ -12,7 +12,7 @@ export default class DMInhibitor extends BushInhibitor {
public async exec(message: CommandMessage | SlashMessage, command: BushCommand): Promise<boolean> {
if (command.channel === 'dm' && message.guild) {
- void client.console.verbose(
+ void this.client.console.verbose(
'dm',
`Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild.name}>>.`
);
diff --git a/src/inhibitors/command/globalDisabledCommand.ts b/src/inhibitors/command/globalDisabledCommand.ts
index 7e855ae..f013183 100644
--- a/src/inhibitors/command/globalDisabledCommand.ts
+++ b/src/inhibitors/command/globalDisabledCommand.ts
@@ -12,8 +12,8 @@ export default class DisabledGuildCommandInhibitor extends BushInhibitor {
public async exec(message: CommandMessage | SlashMessage, command: BushCommand): Promise<boolean> {
if (message.author.isOwner()) return false;
- if (client.cache.global.disabledCommands.includes(command?.id)) {
- void client.console.verbose(
+ if (this.client.cache.global.disabledCommands.includes(command?.id)) {
+ void this.client.console.verbose(
'disabledGlobalCommand',
`Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild?.name}>>.`
);
diff --git a/src/inhibitors/command/guild.ts b/src/inhibitors/command/guild.ts
index 6ea4e6a..ea52d99 100644
--- a/src/inhibitors/command/guild.ts
+++ b/src/inhibitors/command/guild.ts
@@ -12,7 +12,7 @@ export default class GuildInhibitor extends BushInhibitor {
public async exec(message: CommandMessage | SlashMessage, command: BushCommand): Promise<boolean> {
if (command.channel === 'guild' && !message.guild) {
- void client.console.verbose(
+ void this.client.console.verbose(
'guild',
`Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.author.tag}>>.`
);
diff --git a/src/inhibitors/command/guildDisabledCommand.ts b/src/inhibitors/command/guildDisabledCommand.ts
index 7d63093..7fef78a 100644
--- a/src/inhibitors/command/guildDisabledCommand.ts
+++ b/src/inhibitors/command/guildDisabledCommand.ts
@@ -15,7 +15,7 @@ export default class DisabledGuildCommandInhibitor extends BushInhibitor {
if (message.author.isOwner() || message.author.isSuperUser()) return false; // super users bypass guild disabled commands
if ((await message.guild.getSetting('disabledCommands'))?.includes(command?.id)) {
- void client.console.verbose(
+ void this.client.console.verbose(
'disabledGuildCommand',
`Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild.name}>>.`
);
diff --git a/src/inhibitors/command/nsfw.ts b/src/inhibitors/command/nsfw.ts
index f8f2180..ed55b00 100644
--- a/src/inhibitors/command/nsfw.ts
+++ b/src/inhibitors/command/nsfw.ts
@@ -13,7 +13,7 @@ export default class NsfwInhibitor extends BushInhibitor {
public async exec(message: CommandMessage | SlashMessage, command: BushCommand): Promise<boolean> {
if (command.onlyNsfw && !(message.channel as TextChannel).nsfw) {
- void client.console.verbose(
+ void this.client.console.verbose(
'notNsfw',
`Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild?.name}>>.`
);
diff --git a/src/inhibitors/command/owner.ts b/src/inhibitors/command/owner.ts
index 3769d84..7a39063 100644
--- a/src/inhibitors/command/owner.ts
+++ b/src/inhibitors/command/owner.ts
@@ -12,8 +12,8 @@ export default class OwnerInhibitor extends BushInhibitor {
public async exec(message: CommandMessage | SlashMessage, command: BushCommand): Promise<boolean> {
if (command.ownerOnly) {
- if (!client.isOwner(message.author)) {
- void client.console.verbose(
+ if (!this.client.isOwner(message.author)) {
+ void this.client.console.verbose(
'owner',
`Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild?.name}>>.`
);
diff --git a/src/inhibitors/command/restrictedChannel.ts b/src/inhibitors/command/restrictedChannel.ts
index 867756d..849166a 100644
--- a/src/inhibitors/command/restrictedChannel.ts
+++ b/src/inhibitors/command/restrictedChannel.ts
@@ -13,7 +13,7 @@ export default class RestrictedChannelInhibitor extends BushInhibitor {
public async exec(message: CommandMessage | SlashMessage, command: BushCommand): Promise<boolean> {
if (command.restrictedChannels?.length && message.channel) {
if (!command.restrictedChannels.includes(message.channel.id)) {
- void client.console.verbose(
+ void this.client.console.verbose(
'restrictedChannel',
`Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild?.name}>>.`
);
diff --git a/src/inhibitors/command/restrictedGuild.ts b/src/inhibitors/command/restrictedGuild.ts
index 4d43c21..1e2d1b2 100644
--- a/src/inhibitors/command/restrictedGuild.ts
+++ b/src/inhibitors/command/restrictedGuild.ts
@@ -13,7 +13,7 @@ export default class RestrictedGuildInhibitor extends BushInhibitor {
public async exec(message: CommandMessage | SlashMessage, command: BushCommand): Promise<boolean> {
if (command.restrictedChannels?.length && message.channel) {
if (!command.restrictedChannels.includes(message.channel.id)) {
- void client.console.verbose(
+ void this.client.console.verbose(
'restrictedGuild',
`Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild?.name}>>.`
);
diff --git a/src/inhibitors/command/superUser.ts b/src/inhibitors/command/superUser.ts
index 2e44b67..69e95a2 100644
--- a/src/inhibitors/command/superUser.ts
+++ b/src/inhibitors/command/superUser.ts
@@ -12,8 +12,8 @@ export default class SuperUserInhibitor extends BushInhibitor {
public async exec(message: CommandMessage | SlashMessage, command: BushCommand): Promise<boolean> {
if (command.superUserOnly) {
- if (!client.isSuperUser(message.author)) {
- void client.console.verbose(
+ if (!this.client.isSuperUser(message.author)) {
+ void this.client.console.verbose(
'superUser',
`Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild?.name}>>.`
);