ShockZone
ShockZone
DIAdiscord.js - Imagine an app
Created by ShockZone on 8/14/2024 in #djs-questions
String Collectors not Collecting?
Thanks for explaining this - still pretty new to JS. So techincally I could String(ticketTypeSelection.values[0]) and get what I'm looking for?
23 replies
DIAdiscord.js - Imagine an app
Created by ShockZone on 8/14/2024 in #djs-questions
String Collectors not Collecting?
No description
23 replies
DIAdiscord.js - Imagine an app
Created by ShockZone on 8/14/2024 in #djs-questions
String Collectors not Collecting?
23 replies
DIAdiscord.js - Imagine an app
Created by ShockZone on 8/14/2024 in #djs-questions
String Collectors not Collecting?
Followup question... What does this do to execution? The next line is an if that isn't executing. I even threw in an else whose only action is console.log('If failed') Naturally I'm getting If failed
23 replies
DIAdiscord.js - Imagine an app
Created by ShockZone on 8/14/2024 in #djs-questions
String Collectors not Collecting?
Thank you
23 replies
DIAdiscord.js - Imagine an app
Created by ShockZone on 8/14/2024 in #djs-questions
String Collectors not Collecting?
I guess I meant the .on('collect') bit. The response I'm now getting is an obejct, and I can pull the .values from it and keep executing
23 replies
DIAdiscord.js - Imagine an app
Created by ShockZone on 8/14/2024 in #djs-questions
String Collectors not Collecting?
Ah, so that basically removes the need for a collector using awaitMessageComponent
23 replies
DIAdiscord.js - Imagine an app
Created by ShockZone on 8/14/2024 in #djs-questions
String Collectors not Collecting?
is that in here?
const newTicketTypeResponse = await newOrderButtons.reply({
content: 'Select Ticket Type',
components: [ticketTypeRow],
ephemeral: true,
const newTicketTypeResponse = await newOrderButtons.reply({
content: 'Select Ticket Type',
components: [ticketTypeRow],
ephemeral: true,
23 replies
DIAdiscord.js - Imagine an app
Created by ShockZone on 8/14/2024 in #djs-questions
String Collectors not Collecting?
Explain it like I know nothing?
23 replies
DIAdiscord.js - Imagine an app
Created by ShockZone on 8/14/2024 in #djs-questions
String Collectors not Collecting?
The console logs run all the way through "Waiting for user input - ticket type", but have zero interest in actually running the collector on list selection. Even more interesting (for me), is that I'm collecting the 'material' choice
23 replies
DIAdiscord.js - Imagine an app
Created by ShockZone on 8/14/2024 in #djs-questions
String Collectors not Collecting?
// ***************************************
// New Order - New Line StringSelect Response
// ***************************************

const collectorFilter = i => i.user.id === newTicketTypeResponse.user.id;


// Wait for user input
console.log('[mewOrder] Waiting for user input - ticket type');
const ticketTypeSelection = await newTicketTypeResponse.awaitMessageComponent({
});

ticketTypeSelection.on('collect', async newTicketType => {
const selection = newTicketType.values[0];
await newTicketType.reply(`${newTicketType.user} has selected ${selection}!`)
});


console.log(ticketTypeSelection);

ticketTypeSelection.on('collect', async (newTicketType) => {

// Log ticket type chosen

if (ticketTypeSelection.values == 'material') {
console.log('[newOrder] User has chosen material ticket');
}
})
// ***************************************
// New Order - New Line StringSelect Response
// ***************************************

const collectorFilter = i => i.user.id === newTicketTypeResponse.user.id;


// Wait for user input
console.log('[mewOrder] Waiting for user input - ticket type');
const ticketTypeSelection = await newTicketTypeResponse.awaitMessageComponent({
});

ticketTypeSelection.on('collect', async newTicketType => {
const selection = newTicketType.values[0];
await newTicketType.reply(`${newTicketType.user} has selected ${selection}!`)
});


console.log(ticketTypeSelection);

ticketTypeSelection.on('collect', async (newTicketType) => {

// Log ticket type chosen

if (ticketTypeSelection.values == 'material') {
console.log('[newOrder] User has chosen material ticket');
}
})
23 replies