Not getting autocomplete info

Hey, i'm experimenting with the latest discordjs (14.x) and I've set up my command as normal. Command is registered fine, the only thing is I don't get any info. What am I missing
10 Replies
d.js toolkit
d.js toolkit4mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by staff
treble/luna
treble/luna4mo ago
wdym 'i dont get any info' Also read the bullet points
NotBilly
NotBillyOP4mo ago
No description
NotBilly
NotBillyOP4mo ago
here's what happens I have trace(interaction.isAutocomplete()); in code, but I never get any data whilst typing in the older discordjs's this works fine I'm not necessarily expecting any data just yet, I just expect the code to trigger the log
[email protected] node: v22.6.0
I should receive an event when typing, no?
treble/luna
treble/luna4mo ago
* Show your code!
NotBilly
NotBillyOP4mo ago
what part is relevant here? I'm not using js/ts directly but my code works on older discordjs. I can narrow the code down with a bit more info I've wrapped the lib like i create a command via json
{
"name": "faq",
"is_public": true,
"description": "Get or create a quote that can be recalled at anytime by using either the id or the name",
"params": [
{
"name": "question",
"description": "Search for a question to retrieve the answer",
"type":"string",
"autocomplete": true,
"required": true
}
]
}
{
"name": "faq",
"is_public": true,
"description": "Get or create a quote that can be recalled at anytime by using either the id or the name",
"params": [
{
"name": "question",
"description": "Search for a question to retrieve the answer",
"type":"string",
"autocomplete": true,
"required": true
}
]
}
my old project is using [email protected]
treble/luna
treble/luna4mo ago
Your interactionCreate event Or wherever you handle the interaction
NotBilly
NotBillyOP4mo ago
client.on('interactionCreate', function(interaction:BaseCommandInteraction) {

if (!interaction.isCommand() && !interaction.isAutocomplete()
&& !interaction.isChatInputCommand()) {
return;
}

var command = createCommand(interaction);
universe.setComponents(universe.createEntity(), command, interaction);
});
client.on('interactionCreate', function(interaction:BaseCommandInteraction) {

if (!interaction.isCommand() && !interaction.isAutocomplete()
&& !interaction.isChatInputCommand()) {
return;
}

var command = createCommand(interaction);
universe.setComponents(universe.createEntity(), command, interaction);
});
oh... you may have helped me already
NotBilly
NotBillyOP4mo ago
No description
NotBilly
NotBillyOP4mo ago
yep... thanks for the rubberducking 😄
Want results from more Discord servers?
Add your server