aboutsummaryrefslogtreecommitdiff
path: root/src/inhibitors
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-08-28 21:51:17 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-08-28 21:51:17 -0400
commit14eb0e617b084080c4cffc5b781b311c65c5f928 (patch)
tree9aaf1734c1e739814a913afeda40c56b0f84df61 /src/inhibitors
parent03b26d5f00422f3aaddce3db2186765863b1eca0 (diff)
downloadtanzanite-14eb0e617b084080c4cffc5b781b311c65c5f928.tar.gz
tanzanite-14eb0e617b084080c4cffc5b781b311c65c5f928.tar.bz2
tanzanite-14eb0e617b084080c4cffc5b781b311c65c5f928.zip
rebrand v3
Diffstat (limited to 'src/inhibitors')
-rw-r--r--src/inhibitors/blacklist/channelGlobalBlacklist.ts7
-rw-r--r--src/inhibitors/blacklist/channelGuildBlacklist.ts7
-rw-r--r--src/inhibitors/blacklist/guildBlacklist.ts5
-rw-r--r--src/inhibitors/blacklist/userGlobalBlacklist.ts5
-rw-r--r--src/inhibitors/blacklist/userGuildBlacklist.ts5
-rw-r--r--src/inhibitors/checks/fatal.ts5
-rw-r--r--src/inhibitors/checks/guildUnavailable.ts5
-rw-r--r--src/inhibitors/command/dm.ts7
-rw-r--r--src/inhibitors/command/globalDisabledCommand.ts7
-rw-r--r--src/inhibitors/command/guild.ts7
-rw-r--r--src/inhibitors/command/guildDisabledCommand.ts7
-rw-r--r--src/inhibitors/command/nsfw.ts7
-rw-r--r--src/inhibitors/command/owner.ts7
-rw-r--r--src/inhibitors/command/restrictedChannel.ts7
-rw-r--r--src/inhibitors/command/restrictedGuild.ts7
-rw-r--r--src/inhibitors/command/superUser.ts7
16 files changed, 43 insertions, 59 deletions
diff --git a/src/inhibitors/blacklist/channelGlobalBlacklist.ts b/src/inhibitors/blacklist/channelGlobalBlacklist.ts
index 7f23604..988931b 100644
--- a/src/inhibitors/blacklist/channelGlobalBlacklist.ts
+++ b/src/inhibitors/blacklist/channelGlobalBlacklist.ts
@@ -1,16 +1,15 @@
-import { BushInhibitor, type BushCommand, type CommandMessage, type SlashMessage } from '#lib';
+import { BotInhibitor, type BotCommand, type CommandMessage, type SlashMessage } from '#lib';
-export default class UserGlobalBlacklistInhibitor extends BushInhibitor {
+export default class UserGlobalBlacklistInhibitor extends BotInhibitor {
public constructor() {
super('channelGlobalBlacklist', {
reason: 'channelGlobalBlacklist',
- category: 'blacklist',
type: 'post',
priority: 500
});
}
- public exec(message: CommandMessage | SlashMessage, command: BushCommand): boolean {
+ public exec(message: CommandMessage | SlashMessage, command: BotCommand): boolean {
if (!message.author || !message.inGuild()) return false;
// do not change to message.author.isOwner()
if (this.client.isOwner(message.author) || this.client.user!.id === message.author.id) return false;
diff --git a/src/inhibitors/blacklist/channelGuildBlacklist.ts b/src/inhibitors/blacklist/channelGuildBlacklist.ts
index ae087bd..4bf42d2 100644
--- a/src/inhibitors/blacklist/channelGuildBlacklist.ts
+++ b/src/inhibitors/blacklist/channelGuildBlacklist.ts
@@ -1,16 +1,15 @@
-import { BushInhibitor, type BushCommand, type CommandMessage, type SlashMessage } from '#lib';
+import { BotInhibitor, type BotCommand, type CommandMessage, type SlashMessage } from '#lib';
-export default class ChannelGuildBlacklistInhibitor extends BushInhibitor {
+export default class ChannelGuildBlacklistInhibitor extends BotInhibitor {
public constructor() {
super('channelGuildBlacklist', {
reason: 'channelGuildBlacklist',
- category: 'blacklist',
type: 'post',
priority: 499
});
}
- public async exec(message: CommandMessage | SlashMessage, command: BushCommand): Promise<boolean> {
+ public async exec(message: CommandMessage | SlashMessage, command: BotCommand): Promise<boolean> {
if (!message.author || !message.inGuild()) return false;
// do not change to message.author.isOwner()
if (this.client.isOwner(message.author) || this.client.user!.id === message.author.id) return false;
diff --git a/src/inhibitors/blacklist/guildBlacklist.ts b/src/inhibitors/blacklist/guildBlacklist.ts
index b7df41a..636d0a3 100644
--- a/src/inhibitors/blacklist/guildBlacklist.ts
+++ b/src/inhibitors/blacklist/guildBlacklist.ts
@@ -1,10 +1,9 @@
-import { BushInhibitor, type CommandMessage, type SlashMessage } from '#lib';
+import { BotInhibitor, type CommandMessage, type SlashMessage } from '#lib';
-export default class GuildBlacklistInhibitor extends BushInhibitor {
+export default class GuildBlacklistInhibitor extends BotInhibitor {
public constructor() {
super('guildBlacklist', {
reason: 'guildBlacklist',
- category: 'blacklist',
type: 'all',
priority: 50
});
diff --git a/src/inhibitors/blacklist/userGlobalBlacklist.ts b/src/inhibitors/blacklist/userGlobalBlacklist.ts
index e8a1306..f5b15df 100644
--- a/src/inhibitors/blacklist/userGlobalBlacklist.ts
+++ b/src/inhibitors/blacklist/userGlobalBlacklist.ts
@@ -1,10 +1,9 @@
-import { BushInhibitor, type CommandMessage, type SlashMessage } from '#lib';
+import { BotInhibitor, type CommandMessage, type SlashMessage } from '#lib';
-export default class UserGlobalBlacklistInhibitor extends BushInhibitor {
+export default class UserGlobalBlacklistInhibitor extends BotInhibitor {
public constructor() {
super('userGlobalBlacklist', {
reason: 'userGlobalBlacklist',
- category: 'blacklist',
type: 'pre',
priority: 30
});
diff --git a/src/inhibitors/blacklist/userGuildBlacklist.ts b/src/inhibitors/blacklist/userGuildBlacklist.ts
index a661606..3186d59 100644
--- a/src/inhibitors/blacklist/userGuildBlacklist.ts
+++ b/src/inhibitors/blacklist/userGuildBlacklist.ts
@@ -1,10 +1,9 @@
-import { BushInhibitor, type CommandMessage, type SlashMessage } from '#lib';
+import { BotInhibitor, type CommandMessage, type SlashMessage } from '#lib';
-export default class UserGuildBlacklistInhibitor extends BushInhibitor {
+export default class UserGuildBlacklistInhibitor extends BotInhibitor {
public constructor() {
super('userGuildBlacklist', {
reason: 'userGuildBlacklist',
- category: 'blacklist',
type: 'pre',
priority: 20
});
diff --git a/src/inhibitors/checks/fatal.ts b/src/inhibitors/checks/fatal.ts
index 9fda504..4364d48 100644
--- a/src/inhibitors/checks/fatal.ts
+++ b/src/inhibitors/checks/fatal.ts
@@ -1,12 +1,11 @@
-import { BushInhibitor, type SlashMessage } from '#lib';
+import { BotInhibitor, type SlashMessage } from '#lib';
import { type Message } from 'discord.js';
-export default class FatalInhibitor extends BushInhibitor {
+export default class FatalInhibitor extends BotInhibitor {
public constructor() {
super('fatal', {
reason: 'fatal',
type: 'all',
- category: 'checks',
priority: 100
});
}
diff --git a/src/inhibitors/checks/guildUnavailable.ts b/src/inhibitors/checks/guildUnavailable.ts
index f5b62f4..4439d69 100644
--- a/src/inhibitors/checks/guildUnavailable.ts
+++ b/src/inhibitors/checks/guildUnavailable.ts
@@ -1,12 +1,11 @@
-import { BushInhibitor, type SlashMessage } from '#lib';
+import { BotInhibitor, type SlashMessage } from '#lib';
import { type Message } from 'discord.js';
-export default class GuildUnavailableInhibitor extends BushInhibitor {
+export default class GuildUnavailableInhibitor extends BotInhibitor {
public constructor() {
super('guildUnavailable', {
reason: 'guildUnavailable',
type: 'all',
- category: 'checks',
priority: 70
});
}
diff --git a/src/inhibitors/command/dm.ts b/src/inhibitors/command/dm.ts
index 5516c81..f25f542 100644
--- a/src/inhibitors/command/dm.ts
+++ b/src/inhibitors/command/dm.ts
@@ -1,16 +1,15 @@
-import { BushInhibitor, type BushCommand, type CommandMessage, type SlashMessage } from '#lib';
+import { BotInhibitor, type BotCommand, type CommandMessage, type SlashMessage } from '#lib';
-export default class DMInhibitor extends BushInhibitor {
+export default class DMInhibitor extends BotInhibitor {
public constructor() {
super('dm', {
reason: 'dm',
- category: 'command',
type: 'post',
priority: 75
});
}
- public async exec(message: CommandMessage | SlashMessage, command: BushCommand): Promise<boolean> {
+ public async exec(message: CommandMessage | SlashMessage, command: BotCommand): Promise<boolean> {
if (command.channel === 'dm' && message.guild) {
void this.client.console.verbose(
'dm',
diff --git a/src/inhibitors/command/globalDisabledCommand.ts b/src/inhibitors/command/globalDisabledCommand.ts
index f013183..4a93f2f 100644
--- a/src/inhibitors/command/globalDisabledCommand.ts
+++ b/src/inhibitors/command/globalDisabledCommand.ts
@@ -1,16 +1,15 @@
-import { BushInhibitor, type BushCommand, type CommandMessage, type SlashMessage } from '#lib';
+import { BotInhibitor, type BotCommand, type CommandMessage, type SlashMessage } from '#lib';
-export default class DisabledGuildCommandInhibitor extends BushInhibitor {
+export default class DisabledGuildCommandInhibitor extends BotInhibitor {
public constructor() {
super('disabledGlobalCommand', {
reason: 'disabledGlobal',
- category: 'command',
type: 'post',
priority: 300
});
}
- public async exec(message: CommandMessage | SlashMessage, command: BushCommand): Promise<boolean> {
+ public async exec(message: CommandMessage | SlashMessage, command: BotCommand): Promise<boolean> {
if (message.author.isOwner()) return false;
if (this.client.cache.global.disabledCommands.includes(command?.id)) {
void this.client.console.verbose(
diff --git a/src/inhibitors/command/guild.ts b/src/inhibitors/command/guild.ts
index ea52d99..1d70c7d 100644
--- a/src/inhibitors/command/guild.ts
+++ b/src/inhibitors/command/guild.ts
@@ -1,16 +1,15 @@
-import { BushInhibitor, type BushCommand, type CommandMessage, type SlashMessage } from '#lib';
+import { BotInhibitor, type BotCommand, type CommandMessage, type SlashMessage } from '#lib';
-export default class GuildInhibitor extends BushInhibitor {
+export default class GuildInhibitor extends BotInhibitor {
public constructor() {
super('guild', {
reason: 'guild',
- category: 'command',
type: 'post',
priority: 80
});
}
- public async exec(message: CommandMessage | SlashMessage, command: BushCommand): Promise<boolean> {
+ public async exec(message: CommandMessage | SlashMessage, command: BotCommand): Promise<boolean> {
if (command.channel === 'guild' && !message.guild) {
void this.client.console.verbose(
'guild',
diff --git a/src/inhibitors/command/guildDisabledCommand.ts b/src/inhibitors/command/guildDisabledCommand.ts
index 7fef78a..97ac995 100644
--- a/src/inhibitors/command/guildDisabledCommand.ts
+++ b/src/inhibitors/command/guildDisabledCommand.ts
@@ -1,16 +1,15 @@
-import { BushInhibitor, type BushCommand, type CommandMessage, type SlashMessage } from '#lib';
+import { BotInhibitor, type BotCommand, type CommandMessage, type SlashMessage } from '#lib';
-export default class DisabledGuildCommandInhibitor extends BushInhibitor {
+export default class DisabledGuildCommandInhibitor extends BotInhibitor {
public constructor() {
super('disabledGuildCommand', {
reason: 'disabledGuild',
- category: 'command',
type: 'post',
priority: 250
});
}
- public async exec(message: CommandMessage | SlashMessage, command: BushCommand): Promise<boolean> {
+ public async exec(message: CommandMessage | SlashMessage, command: BotCommand): Promise<boolean> {
if (!message.guild || !message.guild) return false;
if (message.author.isOwner() || message.author.isSuperUser()) return false; // super users bypass guild disabled commands
diff --git a/src/inhibitors/command/nsfw.ts b/src/inhibitors/command/nsfw.ts
index ed55b00..623115e 100644
--- a/src/inhibitors/command/nsfw.ts
+++ b/src/inhibitors/command/nsfw.ts
@@ -1,17 +1,16 @@
-import { BushInhibitor, type BushCommand, type CommandMessage, type SlashMessage } from '#lib';
+import { BotInhibitor, type BotCommand, type CommandMessage, type SlashMessage } from '#lib';
import { type TextChannel } from 'discord.js';
-export default class NsfwInhibitor extends BushInhibitor {
+export default class NsfwInhibitor extends BotInhibitor {
public constructor() {
super('nsfw', {
reason: 'notNsfw',
- category: 'command',
type: 'post',
priority: 25
});
}
- public async exec(message: CommandMessage | SlashMessage, command: BushCommand): Promise<boolean> {
+ public async exec(message: CommandMessage | SlashMessage, command: BotCommand): Promise<boolean> {
if (command.onlyNsfw && !(message.channel as TextChannel).nsfw) {
void this.client.console.verbose(
'notNsfw',
diff --git a/src/inhibitors/command/owner.ts b/src/inhibitors/command/owner.ts
index 7a39063..15643be 100644
--- a/src/inhibitors/command/owner.ts
+++ b/src/inhibitors/command/owner.ts
@@ -1,16 +1,15 @@
-import { BushInhibitor, type BushCommand, type CommandMessage, type SlashMessage } from '#lib';
+import { BotInhibitor, type BotCommand, type CommandMessage, type SlashMessage } from '#lib';
-export default class OwnerInhibitor extends BushInhibitor {
+export default class OwnerInhibitor extends BotInhibitor {
public constructor() {
super('owner', {
reason: 'owner',
- category: 'command',
type: 'post',
priority: 100
});
}
- public async exec(message: CommandMessage | SlashMessage, command: BushCommand): Promise<boolean> {
+ public async exec(message: CommandMessage | SlashMessage, command: BotCommand): Promise<boolean> {
if (command.ownerOnly) {
if (!this.client.isOwner(message.author)) {
void this.client.console.verbose(
diff --git a/src/inhibitors/command/restrictedChannel.ts b/src/inhibitors/command/restrictedChannel.ts
index 849166a..ec23604 100644
--- a/src/inhibitors/command/restrictedChannel.ts
+++ b/src/inhibitors/command/restrictedChannel.ts
@@ -1,16 +1,15 @@
-import { BushInhibitor, type BushCommand, type CommandMessage, type SlashMessage } from '#lib';
+import { BotInhibitor, type BotCommand, type CommandMessage, type SlashMessage } from '#lib';
-export default class RestrictedChannelInhibitor extends BushInhibitor {
+export default class RestrictedChannelInhibitor extends BotInhibitor {
public constructor() {
super('restrictedChannel', {
reason: 'restrictedChannel',
- category: 'command',
type: 'post',
priority: 10
});
}
- public async exec(message: CommandMessage | SlashMessage, command: BushCommand): Promise<boolean> {
+ public async exec(message: CommandMessage | SlashMessage, command: BotCommand): Promise<boolean> {
if (command.restrictedChannels?.length && message.channel) {
if (!command.restrictedChannels.includes(message.channel.id)) {
void this.client.console.verbose(
diff --git a/src/inhibitors/command/restrictedGuild.ts b/src/inhibitors/command/restrictedGuild.ts
index 1e2d1b2..ec0ad2c 100644
--- a/src/inhibitors/command/restrictedGuild.ts
+++ b/src/inhibitors/command/restrictedGuild.ts
@@ -1,16 +1,15 @@
-import { BushInhibitor, type BushCommand, type CommandMessage, type SlashMessage } from '#lib';
+import { BotInhibitor, type BotCommand, type CommandMessage, type SlashMessage } from '#lib';
-export default class RestrictedGuildInhibitor extends BushInhibitor {
+export default class RestrictedGuildInhibitor extends BotInhibitor {
public constructor() {
super('restrictedGuild', {
reason: 'restrictedGuild',
- category: 'command',
type: 'post',
priority: 5
});
}
- public async exec(message: CommandMessage | SlashMessage, command: BushCommand): Promise<boolean> {
+ public async exec(message: CommandMessage | SlashMessage, command: BotCommand): Promise<boolean> {
if (command.restrictedChannels?.length && message.channel) {
if (!command.restrictedChannels.includes(message.channel.id)) {
void this.client.console.verbose(
diff --git a/src/inhibitors/command/superUser.ts b/src/inhibitors/command/superUser.ts
index 69e95a2..a923c1a 100644
--- a/src/inhibitors/command/superUser.ts
+++ b/src/inhibitors/command/superUser.ts
@@ -1,16 +1,15 @@
-import { BushInhibitor, type BushCommand, type CommandMessage, type SlashMessage } from '#lib';
+import { BotInhibitor, type BotCommand, type CommandMessage, type SlashMessage } from '#lib';
-export default class SuperUserInhibitor extends BushInhibitor {
+export default class SuperUserInhibitor extends BotInhibitor {
public constructor() {
super('superUser', {
reason: 'superUser',
- category: 'command',
type: 'post',
priority: 99
});
}
- public async exec(message: CommandMessage | SlashMessage, command: BushCommand): Promise<boolean> {
+ public async exec(message: CommandMessage | SlashMessage, command: BotCommand): Promise<boolean> {
if (command.superUserOnly) {
if (!this.client.isSuperUser(message.author)) {
void this.client.console.verbose(