aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Duckham <64110067+IRONM00N@users.noreply.github.com>2022-02-28 07:48:59 -0500
committerOwen Duckham <64110067+IRONM00N@users.noreply.github.com>2022-02-28 07:48:59 -0500
commit5f3a7dfbedee3dd4ec7a91bf7beb593687fdc021 (patch)
treed4cbb45347fcc5939d194e78242f0a1cf9d4a353
parent541988dafb5bea248a706c210a05461b94a3c9a9 (diff)
downloadtanzanite-5f3a7dfbedee3dd4ec7a91bf7beb593687fdc021.tar.gz
tanzanite-5f3a7dfbedee3dd4ec7a91bf7beb593687fdc021.tar.bz2
tanzanite-5f3a7dfbedee3dd4ec7a91bf7beb593687fdc021.zip
fix: revert to client.isOwner
-rw-r--r--src/inhibitors/blacklist/channelGlobalBlacklist.ts5
-rw-r--r--src/inhibitors/blacklist/channelGuildBlacklist.ts5
-rw-r--r--src/inhibitors/blacklist/guildBlacklist.ts6
-rw-r--r--src/inhibitors/blacklist/userGlobalBlacklist.ts3
-rw-r--r--src/inhibitors/blacklist/userGuildBlacklist.ts6
5 files changed, 16 insertions, 9 deletions
diff --git a/src/inhibitors/blacklist/channelGlobalBlacklist.ts b/src/inhibitors/blacklist/channelGlobalBlacklist.ts
index 9023dc2..34c23af 100644
--- a/src/inhibitors/blacklist/channelGlobalBlacklist.ts
+++ b/src/inhibitors/blacklist/channelGlobalBlacklist.ts
@@ -11,8 +11,9 @@ export default class UserGlobalBlacklistInhibitor extends BushInhibitor {
}
public override exec(message: BushMessage | BushSlashMessage, command: BushCommand): boolean {
- if (!message.inGuild()) return false;
- if (message.author.isOwner() || client.user!.id === message.author.id) return false;
+ if (!message.author || !message.inGuild()) return false;
+ // do not change to message.author.isOwner()
+ if (client.isOwner(message.author) || client.user!.id === message.author.id) return false;
if (client.cache.global.blacklistedChannels.includes(message.channel!.id) && !command.bypassChannelBlacklist) {
void client.console.verbose(
'channelGlobalBlacklist',
diff --git a/src/inhibitors/blacklist/channelGuildBlacklist.ts b/src/inhibitors/blacklist/channelGuildBlacklist.ts
index aa5b2d9..09f58d0 100644
--- a/src/inhibitors/blacklist/channelGuildBlacklist.ts
+++ b/src/inhibitors/blacklist/channelGuildBlacklist.ts
@@ -11,8 +11,9 @@ export default class ChannelGuildBlacklistInhibitor extends BushInhibitor {
}
public override async exec(message: BushMessage | BushSlashMessage, command: BushCommand): Promise<boolean> {
- if (!message.inGuild()) return false;
- if (message.author.isOwner() || client.user!.id === message.author.id) return false;
+ if (!message.author || !message.inGuild()) return false;
+ // do not change to message.author.isOwner()
+ if (client.isOwner(message.author) || client.user!.id === message.author.id) return false;
if (
(await message.guild.getSetting('bypassChannelBlacklist'))?.includes(message.author.id) &&
!command.bypassChannelBlacklist
diff --git a/src/inhibitors/blacklist/guildBlacklist.ts b/src/inhibitors/blacklist/guildBlacklist.ts
index 9949c22..d540af7 100644
--- a/src/inhibitors/blacklist/guildBlacklist.ts
+++ b/src/inhibitors/blacklist/guildBlacklist.ts
@@ -11,8 +11,10 @@ export default class GuildBlacklistInhibitor extends BushInhibitor {
}
public override exec(message: BushMessage | BushSlashMessage): boolean {
- if (!message.inGuild()) return false;
- if (message.author.isOwner() || message.author.isSuperUser() || client.user!.id === message.author.id) return false;
+ 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)
+ return false;
if (client.cache.global.blacklistedGuilds.includes(message.guild.id)) {
void client.console.verbose(
'guildBlacklist',
diff --git a/src/inhibitors/blacklist/userGlobalBlacklist.ts b/src/inhibitors/blacklist/userGlobalBlacklist.ts
index d0f9a9f..a3b0cdc 100644
--- a/src/inhibitors/blacklist/userGlobalBlacklist.ts
+++ b/src/inhibitors/blacklist/userGlobalBlacklist.ts
@@ -12,7 +12,8 @@ export default class UserGlobalBlacklistInhibitor extends BushInhibitor {
public override exec(message: BushMessage | BushSlashMessage): boolean {
if (!message.author) return false;
- if (message.author.isOwner() || client.user!.id === message.author.id) return false;
+ // do not change to message.author.isOwner()
+ if (client.isOwner(message.author) || client.user!.id === message.author.id) return false;
if (client.cache.global.blacklistedUsers.includes(message.author.id)) {
void client.console.verbose(
'userGlobalBlacklist',
diff --git a/src/inhibitors/blacklist/userGuildBlacklist.ts b/src/inhibitors/blacklist/userGuildBlacklist.ts
index 61f670e..b6c707a 100644
--- a/src/inhibitors/blacklist/userGuildBlacklist.ts
+++ b/src/inhibitors/blacklist/userGuildBlacklist.ts
@@ -11,8 +11,10 @@ export default class UserGuildBlacklistInhibitor extends BushInhibitor {
}
public override async exec(message: BushMessage | BushSlashMessage): Promise<boolean> {
- if (!message.inGuild()) return false;
- if (message.author.isOwner() || message.author.isSuperUser() || client.user!.id === message.author.id) return false;
+ 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)
+ return false;
if ((await message.guild.getSetting('blacklistedUsers'))?.includes(message.author.id)) {
void client.console.verbose(
'userGuildBlacklist',