Subcommand isn't running

When the subcommand is run in Discord, it times out. I've added a log to the beginning of the method but it isn't triggered. Normal commands work fine.
@ApplyOptions<Subcommand.Options>({
name: 'blacklist',
description: 'Blacklist users or guilds from using the bot.',
preconditions: ['OwnerOnly'],
subcommands: [
{
name: 'user',
chatInputRun: 'chatInputUser'
}
]
})
export class BlacklistCommand extends Subcommand {
public override registerApplicationCommands(
registry: ChatInputCommand.Registry
) {
registry.registerChatInputCommand(
(builder) =>
builder
.setName(this.name)
.setDescription(this.description)
.addSubcommand((command) =>
command
.setName('user')
.setDescription('Blacklist a user from using the bot.')
.addUserOption((option) =>
option
.setName('user')
.setDescription('The user to blacklist.')
.setRequired(true)
)
),
{
guildIds: config.testGuilds
}
);
}

public async chatInputUser(
interaction: Subcommand.ChatInputCommandInteraction
) {
@ApplyOptions<Subcommand.Options>({
name: 'blacklist',
description: 'Blacklist users or guilds from using the bot.',
preconditions: ['OwnerOnly'],
subcommands: [
{
name: 'user',
chatInputRun: 'chatInputUser'
}
]
})
export class BlacklistCommand extends Subcommand {
public override registerApplicationCommands(
registry: ChatInputCommand.Registry
) {
registry.registerChatInputCommand(
(builder) =>
builder
.setName(this.name)
.setDescription(this.description)
.addSubcommand((command) =>
command
.setName('user')
.setDescription('Blacklist a user from using the bot.')
.addUserOption((option) =>
option
.setName('user')
.setDescription('The user to blacklist.')
.setRequired(true)
)
),
{
guildIds: config.testGuilds
}
);
}

public async chatInputUser(
interaction: Subcommand.ChatInputCommandInteraction
) {
Solution:
found the issue, was using the wrong name for my precondition
Jump to solution
1 Reply
Solution
Sam
Sam2y ago
found the issue, was using the wrong name for my precondition
Want results from more Discord servers?
Add your server