ยฉ 2026 Hedgehog Software, LLC
import {Command, container} from "@sapphire/framework"; class Test extends Command { constructor(context, options) { super(context, { ...options, name: 'test', description: 'A test command' }); } async chatInputRun(interaction, context) { const repo = container.EventRepository; const guild_id = interaction.guildId.toString(); let event = await repo.findOneByGuild(guild_id); const team = event.snakes_and_ladders.getTeam(interaction.options.getString('team', true)); return interaction.reply({ content: `You ran a test command with team ${team.name}` }); } registerApplicationCommands(registry) { registry.registerChatInputCommand(builder => builder .setName(this.name) .setDescription(this.description) .addStringOption(option => option .setName('team') .setDescription('A team name') .setRequired(true) .setAutocomplete(true) ) ); } } export {Test}