Goodin
Goodin
DIAdiscord.js - Imagine an app
Created by Goodin on 1/16/2024 in #djs-questions
Interaction Failed
if(json.data?.owns_license == true){
const embed2 = new EmbedBuilder()
.setColor('#FFFFF1')
.setTitle(`Transfer Request`)
.setDescription(`A Transfer Request has been initiated, you will be alerted by DM with the response from the PROP Team.`)
.setTimestamp()

const select = new StringSelectMenuBuilder()
.setMaxValues(3)
.setMinValues(1)
.setCustomId('products')
.setPlaceholder('Pick the products you want to transfer!')
.addOptions(
new StringSelectMenuOptionBuilder()
.setLabel('Airstairs')
.setValue('airstair'),
new StringSelectMenuOptionBuilder()
.setLabel('Placeholder2')
.setValue('placeholder2'),
new StringSelectMenuOptionBuilder()
.setLabel('Placeholder3')
.setValue('placeholder3'),
);

const row2 = new ActionRowBuilder()
.addComponents(select);

const reply = await interaction.reply({ embeds: [embed2] , components: [row2], ephemeral: true });
const collector = reply.createMessageComponentCollector({ componentType: ComponentType.StringSelect })

collector.on('collect', async i => {
const value = i.values[0]
if(!i.user.id == interaction.user.id) return await interaction.reply({ content: 'This selection is not for you!', ephemeral: true })
console.log(i.values)
});
if(json.data?.owns_license == true){
const embed2 = new EmbedBuilder()
.setColor('#FFFFF1')
.setTitle(`Transfer Request`)
.setDescription(`A Transfer Request has been initiated, you will be alerted by DM with the response from the PROP Team.`)
.setTimestamp()

const select = new StringSelectMenuBuilder()
.setMaxValues(3)
.setMinValues(1)
.setCustomId('products')
.setPlaceholder('Pick the products you want to transfer!')
.addOptions(
new StringSelectMenuOptionBuilder()
.setLabel('Airstairs')
.setValue('airstair'),
new StringSelectMenuOptionBuilder()
.setLabel('Placeholder2')
.setValue('placeholder2'),
new StringSelectMenuOptionBuilder()
.setLabel('Placeholder3')
.setValue('placeholder3'),
);

const row2 = new ActionRowBuilder()
.addComponents(select);

const reply = await interaction.reply({ embeds: [embed2] , components: [row2], ephemeral: true });
const collector = reply.createMessageComponentCollector({ componentType: ComponentType.StringSelect })

collector.on('collect', async i => {
const value = i.values[0]
if(!i.user.id == interaction.user.id) return await interaction.reply({ content: 'This selection is not for you!', ephemeral: true })
console.log(i.values)
});
It isn't picking up the collector
13 replies
DIAdiscord.js - Imagine an app
Created by Goodin on 6/25/2023 in #djs-questions
Broken Command Handler
Hello! This handler was jsut working for me but when I changed the file name it just broke
10 replies
DIAdiscord.js - Imagine an app
Created by Goodin on 6/25/2023 in #djs-questions
Fetching all members
How would I fetch all users at once in a server?
18 replies