darby
darby
DIAdiscord.js - Imagine an app
Created by darby on 8/1/2023 in #djs-questions
CommandInteractionOptionResolver broke since updating to v.14.12.1
Hey, did they change something to the OptionResolver? I looked at the changelog but can't seem to find anything.. however since I updated fetching the command options no longer works
4 replies
DIAdiscord.js - Imagine an app
Created by darby on 7/25/2023 in #djs-questions
How to access interaction.options.getSubcommand()
Hi, I have a command in which I also have two subcommands. However when I try to access the subcommand via the getSubcommand() the function is not available for me
8 replies
DIAdiscord.js - Imagine an app
Created by darby on 7/24/2023 in #djs-questions
Help with @discordjs/core - interactionCreate argument passing
Hello, So decided to use @discordjs/core. However when I went through the docs and got to the point where the interactionCreate event is being listend to like that
client.on(GatewayDispatchEvents.InteractionCreate, async ({ data: interaction, api }) => {
if (interaction.type !== InteractionType.ApplicationCommand || interaction.data.name !== 'ping') {
return;
}

await api.interactions.reply(interaction.id, interaction.token, { content: 'Pong!', flags: MessageFlags.Ephemeral });
});
client.on(GatewayDispatchEvents.InteractionCreate, async ({ data: interaction, api }) => {
if (interaction.type !== InteractionType.ApplicationCommand || interaction.data.name !== 'ping') {
return;
}

await api.interactions.reply(interaction.id, interaction.token, { content: 'Pong!', flags: MessageFlags.Ephemeral });
});
I got kinda confused on how to properly translate that to my structure..
21 replies
DIAdiscord.js - Imagine an app
Created by darby on 7/20/2023 in #djs-questions
Applications commands are registered throug rest api but not working
Hello, I am having a bit of a problem.. I a file named command.handler.ts. This file is responsible for loading commands and registration of them through the rest api. This works fine and my test command is also available in my server. However, when I execute the command nothing happens. I am not also not getting any output when I try to console.log(). The event for INTERACTION_CREATE is also being registered.. so I am not getting why it does not work
21 replies