nobody
nobody
DIAdiscord.js - Imagine an app
Created by nobody on 4/27/2025 in #djs-questions
Type error when sending a container and a action row (CV2)
const container = new ContainerBuilder();
const title = new TextDisplayBuilder().setContent(
heading('🛠️ × Manages the ticket category for Test', HeadingLevel.Three),
);
const description = new TextDisplayBuilder().setContent(
'› Create, edit or delete a ticket category on this server using the menu and the button under this message.',
);

const menu = new StringSelectMenuBuilder()
.setCustomId('fadc')
.addOptions(
new StringSelectMenuOptionBuilder()
.setEmoji('🗣️')
.setValue('test')
.setLabel('ladjfkjskflj')
.setDescription('jka'),
new StringSelectMenuOptionBuilder().setEmoji('🗣️').setValue('afdtest').setLabel('ladjfkjskflj'),
new StringSelectMenuOptionBuilder().setEmoji('🗣️').setValue('teadfst').setLabel('ladjfkjskflj'),
new StringSelectMenuOptionBuilder().setEmoji('🗣️').setValue('tesaft').setLabel('ladjfkjskflj'),
new StringSelectMenuOptionBuilder().setEmoji('🗣️').setValue('testaf').setLabel('ladjfkjskflj'),
);
const row1 = new ActionRowBuilder().addComponents(menu);

container.addTextDisplayComponents(title, description);

interaction.reply({
flags: MessageFlags.IsComponentsV2,
components: [container, row1],
});
const container = new ContainerBuilder();
const title = new TextDisplayBuilder().setContent(
heading('🛠️ × Manages the ticket category for Test', HeadingLevel.Three),
);
const description = new TextDisplayBuilder().setContent(
'› Create, edit or delete a ticket category on this server using the menu and the button under this message.',
);

const menu = new StringSelectMenuBuilder()
.setCustomId('fadc')
.addOptions(
new StringSelectMenuOptionBuilder()
.setEmoji('🗣️')
.setValue('test')
.setLabel('ladjfkjskflj')
.setDescription('jka'),
new StringSelectMenuOptionBuilder().setEmoji('🗣️').setValue('afdtest').setLabel('ladjfkjskflj'),
new StringSelectMenuOptionBuilder().setEmoji('🗣️').setValue('teadfst').setLabel('ladjfkjskflj'),
new StringSelectMenuOptionBuilder().setEmoji('🗣️').setValue('tesaft').setLabel('ladjfkjskflj'),
new StringSelectMenuOptionBuilder().setEmoji('🗣️').setValue('testaf').setLabel('ladjfkjskflj'),
);
const row1 = new ActionRowBuilder().addComponents(menu);

container.addTextDisplayComponents(title, description);

interaction.reply({
flags: MessageFlags.IsComponentsV2,
components: [container, row1],
});
6 replies
DIAdiscord.js - Imagine an app
Created by nobody on 4/4/2023 in #djs-voice
getVoiceConnection return undefined?
the code returned undefined and my bot is connected to a voice channel
const test = getVoiceConnection(interaction.guildId);
return console.log(test);
const test = getVoiceConnection(interaction.guildId);
return console.log(test);
7 replies