diff options
Diffstat (limited to 'src/inhibitors/command')
-rw-r--r-- | src/inhibitors/command/dm.ts | 7 | ||||
-rw-r--r-- | src/inhibitors/command/globalDisabledCommand.ts | 7 | ||||
-rw-r--r-- | src/inhibitors/command/guild.ts | 7 | ||||
-rw-r--r-- | src/inhibitors/command/guildDisabledCommand.ts | 7 | ||||
-rw-r--r-- | src/inhibitors/command/nsfw.ts | 7 | ||||
-rw-r--r-- | src/inhibitors/command/owner.ts | 7 | ||||
-rw-r--r-- | src/inhibitors/command/restrictedChannel.ts | 7 | ||||
-rw-r--r-- | src/inhibitors/command/restrictedGuild.ts | 7 | ||||
-rw-r--r-- | src/inhibitors/command/superUser.ts | 7 |
9 files changed, 27 insertions, 36 deletions
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( |