npm list discord.js and node node -v version?module.exports = class Akinator extends Command {
constructor(client) {
super(client, {
data: new SlashCommandBuilder()
.setName('akinator')
.setDescription('Play Akinator Game.')
.setDMPermission(true)
.addStringOption(option =>
option.setName(`language`)
.setDescription(`In Which Language You Want To Play Akinator`)
.setRequired(true)
.setAutocomplete(true)),
async autocomplete(interaction) {
const focusedValue = interaction.options.getFocused();
const choices = ['Popular Topics: Threads', 'Sharding: Getting started', 'Library: Voice Connections', 'Interactions: Replying to slash commands', 'Popular Topics: Embed preview'];
const filtered = choices.filter(choice => choice.includes(focusedValue));
await interaction.respond(
filtered.map(choice => ({ name: choice, value: choice })),
);
},
usage: 'akinator',
category: 'akinator',
permissions: ['Use Application Commands', 'Send Messages', 'Embed Links'],
});
}
async run(client, interaction) {
}
};module.exports = class Akinator extends Command {
constructor(client) {
super(client, {
data: new SlashCommandBuilder()
.setName('akinator')
.setDescription('Play Akinator Game.')
.setDMPermission(true)
.addStringOption(option =>
option.setName(`language`)
.setDescription(`In Which Language You Want To Play Akinator`)
.setRequired(true)
.setAutocomplete(true)),
usage: 'akinator',
category: 'akinator',
permissions: ['Use Application Commands', 'Send Messages', 'Embed Links'],
});
}
async autocomplete(interaction) {
const focusedValue = interaction.options.getFocused();
const choices = ['Popular Topics: Threads', 'Sharding: Getting started', 'Library: Voice Connections', 'Interactions: Replying to slash commands', 'Popular Topics: Embed preview'];
const filtered = choices.filter(choice => choice.includes(focusedValue));
await interaction.respond(
filtered.map(choice => ({ name: choice, value: choice })),
);
}
async run(client, interaction) {
// Your command logic goes here
}
};{
name: 'akinator',
description: 'Play Akinator Game.',
options: [
{
choices: undefined,
autocomplete: true,
type: 3,
name: 'language',
name_localizations: undefined,
description: 'In Which Language You Want To Play Akinator',
description_localizations: undefined,
required: true,
max_length: undefined,
min_length: undefined
}
],
defaultPermission: undefined,
contextDescription: null,
usage: 'akinator',
category: 'akinator',
permissions: [ 'Use Application Commands', 'Send Messages', 'Embed Links' ],
run: [AsyncFunction: run]
}module.exports = class Command {
constructor(client, meta = {}) {
this.client = client;
this.data = meta.data;
this.contextDescription = meta.contextDescription || null;
this.usage = meta.usage || this.name;
this.category = meta.category || 'Info';
this.permissions = meta.permissions || ['Use Application Commands', 'Send Messages', 'Embed Links'];
}
async run() {
throw new Error(`The Slash Command "${this.name}" does not provide a run method.`);
}
};