diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-11-22 19:01:46 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-11-22 19:01:46 -0500 |
commit | fce1fc87feb3e6dad1a956d757d856833c9ea5f6 (patch) | |
tree | 723ca41af60df525b89c6ff5b4e9574f78235734 /src/inhibitors | |
parent | 23bf2485fe17472f17bd0ee0af6b22973e317550 (diff) | |
download | tanzanite-fce1fc87feb3e6dad1a956d757d856833c9ea5f6.tar.gz tanzanite-fce1fc87feb3e6dad1a956d757d856833c9ea5f6.tar.bz2 tanzanite-fce1fc87feb3e6dad1a956d757d856833c9ea5f6.zip |
update contributors, fix formatting, added a bunch of repo forks
Diffstat (limited to 'src/inhibitors')
-rw-r--r-- | src/inhibitors/blacklist/channelGlobalBlacklist.ts | 5 | ||||
-rw-r--r-- | src/inhibitors/blacklist/channelGuildBlacklist.ts | 5 | ||||
-rw-r--r-- | src/inhibitors/blacklist/guildBlacklist.ts | 5 | ||||
-rw-r--r-- | src/inhibitors/blacklist/userGlobalBlacklist.ts | 7 | ||||
-rw-r--r-- | src/inhibitors/blacklist/userGuildBlacklist.ts | 5 | ||||
-rw-r--r-- | src/inhibitors/checks/fatal.ts | 5 | ||||
-rw-r--r-- | src/inhibitors/checks/guildUnavailable.ts | 5 | ||||
-rw-r--r-- | src/inhibitors/command/dm.ts | 5 | ||||
-rw-r--r-- | src/inhibitors/command/globalDisabledCommand.ts | 5 | ||||
-rw-r--r-- | src/inhibitors/command/guild.ts | 5 | ||||
-rw-r--r-- | src/inhibitors/command/guildDisabledCommand.ts | 5 | ||||
-rw-r--r-- | src/inhibitors/command/nsfw.ts | 5 | ||||
-rw-r--r-- | src/inhibitors/command/owner.ts | 5 | ||||
-rw-r--r-- | src/inhibitors/command/restrictedChannel.ts | 5 | ||||
-rw-r--r-- | src/inhibitors/command/restrictedGuild.ts | 5 | ||||
-rw-r--r-- | src/inhibitors/command/superUser.ts | 5 |
16 files changed, 66 insertions, 16 deletions
diff --git a/src/inhibitors/blacklist/channelGlobalBlacklist.ts b/src/inhibitors/blacklist/channelGlobalBlacklist.ts index 5a0f0f1..b9d7240 100644 --- a/src/inhibitors/blacklist/channelGlobalBlacklist.ts +++ b/src/inhibitors/blacklist/channelGlobalBlacklist.ts @@ -15,7 +15,10 @@ export default class UserGlobalBlacklistInhibitor extends BushInhibitor { if (client.isOwner(message.author) || /* client.isSuperUser(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', `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild.name}>>.`) + void client.console.verbose( + 'channelGlobalBlacklist', + `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild.name}>>.` + ); return true; } return false; diff --git a/src/inhibitors/blacklist/channelGuildBlacklist.ts b/src/inhibitors/blacklist/channelGuildBlacklist.ts index a2c50e3..e881ebb 100644 --- a/src/inhibitors/blacklist/channelGuildBlacklist.ts +++ b/src/inhibitors/blacklist/channelGuildBlacklist.ts @@ -24,7 +24,10 @@ export default class ChannelGuildBlacklistInhibitor extends BushInhibitor { (await message.guild.getSetting('blacklistedChannels'))?.includes(message.channel!.id) && !command.bypassChannelBlacklist ) { - void client.console.verbose('channelGuildBlacklist', `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild.name}>>.`) + void client.console.verbose( + 'channelGuildBlacklist', + `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild.name}>>.` + ); return true; } return false; diff --git a/src/inhibitors/blacklist/guildBlacklist.ts b/src/inhibitors/blacklist/guildBlacklist.ts index 4fb7b5a..b319475 100644 --- a/src/inhibitors/blacklist/guildBlacklist.ts +++ b/src/inhibitors/blacklist/guildBlacklist.ts @@ -18,7 +18,10 @@ export default class GuildBlacklistInhibitor extends BushInhibitor { ) return false; if (client.cache.global.blacklistedGuilds.includes(message.guild.id)) { - void client.console.verbose('guildBlacklist', `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild.name}>>.`) + void client.console.verbose( + 'guildBlacklist', + `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild.name}>>.` + ); return true; } return false; diff --git a/src/inhibitors/blacklist/userGlobalBlacklist.ts b/src/inhibitors/blacklist/userGlobalBlacklist.ts index 5d07ddb..0f8cea7 100644 --- a/src/inhibitors/blacklist/userGlobalBlacklist.ts +++ b/src/inhibitors/blacklist/userGlobalBlacklist.ts @@ -15,7 +15,12 @@ export default class UserGlobalBlacklistInhibitor extends BushInhibitor { if (client.isOwner(message.author) || client.isSuperUser(message.author) || client.user!.id === message.author.id) return false; if (client.cache.global.blacklistedUsers.includes(message.author.id)) { - void client.console.verbose('userGlobalBlacklist', `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.inGuild() ? message.guild?.name : message.author.tag}>>.`) + void client.console.verbose( + 'userGlobalBlacklist', + `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${ + message.inGuild() ? message.guild?.name : message.author.tag + }>>.` + ); return true; } return false; diff --git a/src/inhibitors/blacklist/userGuildBlacklist.ts b/src/inhibitors/blacklist/userGuildBlacklist.ts index e1c40ce..a87e47c 100644 --- a/src/inhibitors/blacklist/userGuildBlacklist.ts +++ b/src/inhibitors/blacklist/userGuildBlacklist.ts @@ -15,7 +15,10 @@ export default class UserGuildBlacklistInhibitor extends BushInhibitor { 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', `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild.name}>>.`) + void client.console.verbose( + 'userGuildBlacklist', + `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild.name}>>.` + ); return true; } return false; diff --git a/src/inhibitors/checks/fatal.ts b/src/inhibitors/checks/fatal.ts index 68e1371..2521b2f 100644 --- a/src/inhibitors/checks/fatal.ts +++ b/src/inhibitors/checks/fatal.ts @@ -14,7 +14,10 @@ export default class FatalInhibitor extends BushInhibitor { if (client.isOwner(message.author)) return false; for (const property in client.cache.global) { if (!client.cache.global[property as keyof typeof client.cache.global]) { - void client.console.verbose('fatal', `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild?.name}>>.`) + void client.console.verbose( + 'fatal', + `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild?.name}>>.` + ); return true; } } diff --git a/src/inhibitors/checks/guildUnavailable.ts b/src/inhibitors/checks/guildUnavailable.ts index 38d0ffa..eb85fb7 100644 --- a/src/inhibitors/checks/guildUnavailable.ts +++ b/src/inhibitors/checks/guildUnavailable.ts @@ -12,7 +12,10 @@ export default class GuildUnavailableInhibitor extends BushInhibitor { public override async exec(message: BushMessage | BushSlashMessage): Promise<boolean> { if (message.guild && !message.guild.available) { - void client.console.verbose('guildUnavailable', `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild.name}>>.`) + void client.console.verbose( + 'guildUnavailable', + `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild.name}>>.` + ); return true; } return false; diff --git a/src/inhibitors/command/dm.ts b/src/inhibitors/command/dm.ts index 34fcb12..ebcd647 100644 --- a/src/inhibitors/command/dm.ts +++ b/src/inhibitors/command/dm.ts @@ -12,7 +12,10 @@ export default class DMInhibitor extends BushInhibitor { public override async exec(message: BushMessage | BushSlashMessage, command: BushCommand): Promise<boolean> { if (command.channel === 'dm' && message.guild) { - void client.console.verbose('dm', `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild.name}>>.`) + void client.console.verbose( + 'dm', + `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild.name}>>.` + ); return true; } return false; diff --git a/src/inhibitors/command/globalDisabledCommand.ts b/src/inhibitors/command/globalDisabledCommand.ts index da267ef..82163f0 100644 --- a/src/inhibitors/command/globalDisabledCommand.ts +++ b/src/inhibitors/command/globalDisabledCommand.ts @@ -13,7 +13,10 @@ export default class DisabledGuildCommandInhibitor extends BushInhibitor { public override async exec(message: BushMessage | BushSlashMessage, command: BushCommand): Promise<boolean> { if (message.author.isOwner()) return false; if (client.cache.global.disabledCommands?.includes(command?.id)) { - void client.console.verbose('disabledGlobalCommand', `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild?.name}>>.`) + void client.console.verbose( + 'disabledGlobalCommand', + `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild?.name}>>.` + ); return true; } return false; diff --git a/src/inhibitors/command/guild.ts b/src/inhibitors/command/guild.ts index 9843972..69b5df9 100644 --- a/src/inhibitors/command/guild.ts +++ b/src/inhibitors/command/guild.ts @@ -12,7 +12,10 @@ export default class GuildInhibitor extends BushInhibitor { public override async exec(message: BushMessage | BushSlashMessage, command: BushCommand): Promise<boolean> { if (command.channel === 'guild' && !message.guild) { - void client.console.verbose('guild', `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.author.tag}>>.`) + void client.console.verbose( + 'guild', + `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.author.tag}>>.` + ); return true; } return false; diff --git a/src/inhibitors/command/guildDisabledCommand.ts b/src/inhibitors/command/guildDisabledCommand.ts index 4343b1a..a04984d 100644 --- a/src/inhibitors/command/guildDisabledCommand.ts +++ b/src/inhibitors/command/guildDisabledCommand.ts @@ -15,7 +15,10 @@ 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('disabledGuildCommand', `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild.name}>>.`) + void client.console.verbose( + 'disabledGuildCommand', + `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild.name}>>.` + ); return true; } return false; diff --git a/src/inhibitors/command/nsfw.ts b/src/inhibitors/command/nsfw.ts index 7f0f3e7..fb4e51f 100644 --- a/src/inhibitors/command/nsfw.ts +++ b/src/inhibitors/command/nsfw.ts @@ -13,7 +13,10 @@ export default class NsfwInhibitor extends BushInhibitor { public override async exec(message: BushMessage | BushSlashMessage, command: BushCommand): Promise<boolean> { if (command.onlyNsfw && !(message.channel as TextChannel).nsfw) { - void client.console.verbose('notNsfw', `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild?.name}>>.`) + void client.console.verbose( + 'notNsfw', + `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild?.name}>>.` + ); return true; } return false; diff --git a/src/inhibitors/command/owner.ts b/src/inhibitors/command/owner.ts index 86bab76..8eee1e0 100644 --- a/src/inhibitors/command/owner.ts +++ b/src/inhibitors/command/owner.ts @@ -13,7 +13,10 @@ export default class OwnerInhibitor extends BushInhibitor { public override async exec(message: BushMessage | BushSlashMessage, command: BushCommand): Promise<boolean> { if (command.ownerOnly) { if (!client.isOwner(message.author)) { - void client.console.verbose('owner', `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild?.name}>>.`) + void client.console.verbose( + 'owner', + `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild?.name}>>.` + ); return true; } } diff --git a/src/inhibitors/command/restrictedChannel.ts b/src/inhibitors/command/restrictedChannel.ts index 265200e..c8f2e1e 100644 --- a/src/inhibitors/command/restrictedChannel.ts +++ b/src/inhibitors/command/restrictedChannel.ts @@ -13,7 +13,10 @@ export default class RestrictedChannelInhibitor extends BushInhibitor { public override async exec(message: BushMessage | BushSlashMessage, command: BushCommand): Promise<boolean> { if (command.restrictedChannels?.length && message.channel) { if (!command.restrictedChannels.includes(message.channel.id)) { - void client.console.verbose('restrictedChannel', `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild?.name}>>.`) + void client.console.verbose( + 'restrictedChannel', + `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild?.name}>>.` + ); return true; } } diff --git a/src/inhibitors/command/restrictedGuild.ts b/src/inhibitors/command/restrictedGuild.ts index a27220c..a8a5097 100644 --- a/src/inhibitors/command/restrictedGuild.ts +++ b/src/inhibitors/command/restrictedGuild.ts @@ -13,7 +13,10 @@ export default class RestrictedGuildInhibitor extends BushInhibitor { public override async exec(message: BushMessage | BushSlashMessage, command: BushCommand): Promise<boolean> { if (command.restrictedChannels?.length && message.channel) { if (!command.restrictedChannels.includes(message.channel.id)) { - void client.console.verbose('restrictedGuild', `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild?.name}>>.`) + void client.console.verbose( + 'restrictedGuild', + `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild?.name}>>.` + ); return true; } } diff --git a/src/inhibitors/command/superUser.ts b/src/inhibitors/command/superUser.ts index a34df6d..a7c1f47 100644 --- a/src/inhibitors/command/superUser.ts +++ b/src/inhibitors/command/superUser.ts @@ -13,7 +13,10 @@ export default class SuperUserInhibitor extends BushInhibitor { public override async exec(message: BushMessage | BushSlashMessage, command: BushCommand): Promise<boolean> { if (command.superUserOnly) { if (!client.isSuperUser(message.author)) { - void client.console.verbose('superUser', `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild?.name}>>.`) + void client.console.verbose( + 'superUser', + `Blocked message with id <<${message.id}>> from <<${message.author.tag}>> in <<${message.guild?.name}>>.` + ); return true; } } |