Ikke
Ikke
DIAdiscord.js - Imagine an app
Created by Ikke on 7/18/2024 in #djs-questions
Using Slash Command to send a message in a different chat and I want to capture the response
const commandChannel = await client.channels.fetch(command);
await commandChannel.send({
content: `%xero ${code}`
});

const filter = m => m.content.includes(code);

const collectedMapInfo = await commandChannel.awaitMessages({ filter, max: 1, time: 20_000, errors: ['time'] });

if (!collectedMapInfo) {
await interaction.editReply({ content: `Oops! Something went wront. Time out trying to get Map Info from Sharpiebot`, ephemeral: true });
return;
}
const commandChannel = await client.channels.fetch(command);
await commandChannel.send({
content: `%xero ${code}`
});

const filter = m => m.content.includes(code);

const collectedMapInfo = await commandChannel.awaitMessages({ filter, max: 1, time: 20_000, errors: ['time'] });

if (!collectedMapInfo) {
await interaction.editReply({ content: `Oops! Something went wront. Time out trying to get Map Info from Sharpiebot`, ephemeral: true });
return;
}
9 replies
DIAdiscord.js - Imagine an app
Created by Ikke on 7/18/2024 in #djs-questions
Using Slash Command to send a message in a different chat and I want to capture the response
it worked @Qjuh, thanks a lot
9 replies
DIAdiscord.js - Imagine an app
Created by Ikke on 7/18/2024 in #djs-questions
Using Slash Command to send a message in a different chat and I want to capture the response
gonna test it guys, thank you
9 replies
DIAdiscord.js - Imagine an app
Created by Ikke on 7/18/2024 in #djs-questions
Using Slash Command to send a message in a different chat and I want to capture the response
9 replies