aboutsummaryrefslogtreecommitdiff
path: root/src/inhibitors/blacklist/guildBlacklist.ts
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/blacklist/guildBlacklist.ts
parent0e87bbd3940d89defcb04926587b35c8f4d1947f (diff)
downloadtanzanite-e1c613829950a534d9f45c00a033b83575be3b3c.tar.gz
tanzanite-e1c613829950a534d9f45c00a033b83575be3b3c.tar.bz2
tanzanite-e1c613829950a534d9f45c00a033b83575be3b3c.zip
remove global client variable
Diffstat (limited to 'src/inhibitors/blacklist/guildBlacklist.ts')
-rw-r--r--src/inhibitors/blacklist/guildBlacklist.ts10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/inhibitors/blacklist/guildBlacklist.ts b/src/inhibitors/blacklist/guildBlacklist.ts
index 60c5755..b7df41a 100644
--- a/src/inhibitors/blacklist/guildBlacklist.ts
+++ b/src/inhibitors/blacklist/guildBlacklist.ts
@@ -13,10 +13,14 @@ export default class GuildBlacklistInhibitor extends BushInhibitor {
public exec(message: CommandMessage | SlashMessage): boolean {
if (!message.author || !message.inGuild()) return false;
// do not change to message.author.isOwner()
- if (client.isOwner(message.author) || client.isSuperUser(message.author) || client.user!.id === message.author.id)
+ if (
+ this.client.isOwner(message.author) ||
+ this.client.isSuperUser(message.author) ||
+ this.client.user!.id === message.author.id
+ )
return false;
- if (client.cache.global.blacklistedGuilds.includes(message.guild.id)) {
- void client.console.verbose(
+ if (this.client.cache.global.blacklistedGuilds.includes(message.guild.id)) {
+ void this.client.console.verbose(
'guildBlacklist',
`Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild.name}>>.`
);