torten
torten
SIASapphire - Imagine a Framework
Created by torten on 4/29/2025 in #sapphire-support
How to send message on a different channel
I'm making a command that sends a message on a different channel, now whenever I try to send messages based on what I can find on google, it doesn't send. here's the paste. https://pastebin.com/6pHH0XmJ
3 replies
SIASapphire - Imagine a Framework
Created by torten on 4/26/2025 in #sapphire-support
Command not Registering
So my command isint registering, here is the code
import { Command } from '@sapphire/framework';

export class KycCommand extends Command {
public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, {
...options,
enabled: true,
name: 'kyc',
description: 'Do Know-your-customer verification.',
});
}

public override registerApplicationCommands(registry: Command.Registry) {
registry.registerChatInputCommand((builder) =>
builder //
.setName(this.name)
.setDescription(this.description)
.addUserOption((option) =>
option //
.setName('ign')
.setDescription('Your Minecraft IGN')
.setRequired(true)
)
);
}

public override async chatInputRun(interaction: Command.ChatInputCommandInteraction) {
const mcIGN = interaction.options.getString('ign', true);

return await interaction.reply({
content: `MC Ign is: ${mcIGN}`,
});
}
}
import { Command } from '@sapphire/framework';

export class KycCommand extends Command {
public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, {
...options,
enabled: true,
name: 'kyc',
description: 'Do Know-your-customer verification.',
});
}

public override registerApplicationCommands(registry: Command.Registry) {
registry.registerChatInputCommand((builder) =>
builder //
.setName(this.name)
.setDescription(this.description)
.addUserOption((option) =>
option //
.setName('ign')
.setDescription('Your Minecraft IGN')
.setRequired(true)
)
);
}

public override async chatInputRun(interaction: Command.ChatInputCommandInteraction) {
const mcIGN = interaction.options.getString('ign', true);

return await interaction.reply({
content: `MC Ign is: ${mcIGN}`,
});
}
}
as a sanity check, I copied the ping example from the docs and it worked
24 replies