SadlyNotSappho
SadlyNotSappho
SIASapphire - Imagine a framework
Created by SadlyNotSappho on 2/10/2023 in #sapphire-support
guild commands not showing in command lookup
Another thread was posted about this just over a week ago, but the OP deleted his message. Basically, like the thread title says, I have a guild command, generated by the CLI, and it's just not showing in the command picker thing. Here's the code for the command:
import { ApplyOptions } from '@sapphire/decorators';
import { Command } from '@sapphire/framework';

@ApplyOptions<Command.Options>({
name: 'ping',
description: 'A basic slash command'
})
export class UserCommand extends Command {
public override registerApplicationCommands(registry: Command.Registry) {
registry.registerChatInputCommand((builder) =>
builder //
.setName(this.name)
.setDescription(this.description),
{
guildIds: ['1030563119132594187'],
// idHints: []
}
);
}

public override async chatInputRun(interaction: Command.ChatInputCommandInteraction) {
return interaction.reply({ content: 'Hello world!' });
}
}
import { ApplyOptions } from '@sapphire/decorators';
import { Command } from '@sapphire/framework';

@ApplyOptions<Command.Options>({
name: 'ping',
description: 'A basic slash command'
})
export class UserCommand extends Command {
public override registerApplicationCommands(registry: Command.Registry) {
registry.registerChatInputCommand((builder) =>
builder //
.setName(this.name)
.setDescription(this.description),
{
guildIds: ['1030563119132594187'],
// idHints: []
}
);
}

public override async chatInputRun(interaction: Command.ChatInputCommandInteraction) {
return interaction.reply({ content: 'Hello world!' });
}
}
71 replies