const { Command } = require("@sapphire/framework");
const { EmbedBuilder } = require("discord.js");
class SettingsCommand extends Command {
constructor(context, options) {
super(context, {
...options,
description: "Edit or view server-specific settings.",
subcommands: [
{
name: "view",
chatInputRun: "chatInputView",
}
]
});
}
registerApplicationCommands(registry) {
registry.registerChatInputCommand((builder) =>
builder
.setName(this.name)
.setDescription(this.description)
.addSubcommand((command) =>
command
.setName("view")
.setDescription("View your current settings."))
);
}
async chatInputView(interaction) {
const embed = new EmbedBuilder()
.setDescription(`**Panel URL:** link\n**Panel API Key:** ||api key||`)
return interaction.reply({ embeds: [embed] });
}
}
module.exports = {
SettingsCommand
};
const { Command } = require("@sapphire/framework");
const { EmbedBuilder } = require("discord.js");
class SettingsCommand extends Command {
constructor(context, options) {
super(context, {
...options,
description: "Edit or view server-specific settings.",
subcommands: [
{
name: "view",
chatInputRun: "chatInputView",
}
]
});
}
registerApplicationCommands(registry) {
registry.registerChatInputCommand((builder) =>
builder
.setName(this.name)
.setDescription(this.description)
.addSubcommand((command) =>
command
.setName("view")
.setDescription("View your current settings."))
);
}
async chatInputView(interaction) {
const embed = new EmbedBuilder()
.setDescription(`**Panel URL:** link\n**Panel API Key:** ||api key||`)
return interaction.reply({ embeds: [embed] });
}
}
module.exports = {
SettingsCommand
};