Gykas
Gykas
DIAdiscord.js - Imagine an app
Created by Gykas on 8/1/2024 in #djs-questions
Generating embeds but size exceed 6000
okay thx !
6 replies
DIAdiscord.js - Imagine an app
Created by Gykas on 8/1/2024 in #djs-questions
Generating embeds but size exceed 6000
i know that but is there a way to calculate the length of the embed ? And is it linked to the number of embeds sent in the same message ?
6 replies
DIAdiscord.js - Imagine an app
Created by Gykas on 7/17/2024 in #djs-questions
Modal collecting two responses
Ok so we are good I will test it soon thx for ur help !
41 replies
DIAdiscord.js - Imagine an app
Created by Gykas on 7/17/2024 in #djs-questions
Modal collecting two responses
Thats what I have done no ?
41 replies
DIAdiscord.js - Imagine an app
Created by Gykas on 7/17/2024 in #djs-questions
Modal collecting two responses
And that’s it?
41 replies
DIAdiscord.js - Imagine an app
Created by Gykas on 7/17/2024 in #djs-questions
Modal collecting two responses
In my filtrer
41 replies
DIAdiscord.js - Imagine an app
Created by Gykas on 7/17/2024 in #djs-questions
Modal collecting two responses
So its int.customId ?
41 replies
DIAdiscord.js - Imagine an app
Created by Gykas on 7/17/2024 in #djs-questions
Modal collecting two responses
with the interaction.id, that's what im doing no ?
41 replies
DIAdiscord.js - Imagine an app
Created by Gykas on 7/17/2024 in #djs-questions
Modal collecting two responses
here is the final code
41 replies
DIAdiscord.js - Imagine an app
Created by Gykas on 7/17/2024 in #djs-questions
Modal collecting two responses
await msg.awaitMessageComponent({ time: 30000 })
.then(async (interaction) => {
const modalChannel = new ModalBuilder()
.setCustomId(interaction.id)
.setTitle("Modifier le salon de log");

const channelInput = new TextInputBuilder()
.setCustomId("channel_input")
.setLabel("Nouveau salon")
.setRequired(false)
.setStyle(TextInputStyle.Short);

const channelActionRow = new ActionRowBuilder().addComponents(
channelInput
);

modalChannel.addComponents(channelActionRow);

await interaction.showModal(modalChannel);

await interaction
.awaitModalSubmit({
filter: (int) => int.id === interaction.id,
time: 30000,
})
.then(async (int) => {
await int.deferUpdate().catch(() => {});
// ...
await msg.awaitMessageComponent({ time: 30000 })
.then(async (interaction) => {
const modalChannel = new ModalBuilder()
.setCustomId(interaction.id)
.setTitle("Modifier le salon de log");

const channelInput = new TextInputBuilder()
.setCustomId("channel_input")
.setLabel("Nouveau salon")
.setRequired(false)
.setStyle(TextInputStyle.Short);

const channelActionRow = new ActionRowBuilder().addComponents(
channelInput
);

modalChannel.addComponents(channelActionRow);

await interaction.showModal(modalChannel);

await interaction
.awaitModalSubmit({
filter: (int) => int.id === interaction.id,
time: 30000,
})
.then(async (int) => {
await int.deferUpdate().catch(() => {});
// ...
41 replies
DIAdiscord.js - Imagine an app
Created by Gykas on 7/17/2024 in #djs-questions
Modal collecting two responses
but otherwise the two other modifications that I made are correct?
41 replies
DIAdiscord.js - Imagine an app
Created by Gykas on 7/17/2024 in #djs-questions
Modal collecting two responses
yes but i changed it nvm
41 replies
DIAdiscord.js - Imagine an app
Created by Gykas on 7/17/2024 in #djs-questions
Modal collecting two responses
it's in a slash command and yeah its msg.awaitMessageComponent not i.channel
41 replies
DIAdiscord.js - Imagine an app
Created by Gykas on 7/17/2024 in #djs-questions
Modal collecting two responses
and then my filter is filter: (int) => int.customId === interaction.id
41 replies
DIAdiscord.js - Imagine an app
Created by Gykas on 7/17/2024 in #djs-questions
Modal collecting two responses
so basically just .setCustomId(interaction.id)
41 replies
DIAdiscord.js - Imagine an app
Created by Gykas on 7/17/2024 in #djs-questions
Modal collecting two responses
it's the second one the modal interaction
41 replies
DIAdiscord.js - Imagine an app
Created by Gykas on 7/17/2024 in #djs-questions
Modal collecting two responses
await i.channel
.awaitMessageComponent({
filter,
time: 30000,
})
.then(async (interaction) => {
const modalChannel = new ModalBuilder()
.setCustomId("channel_modal")
.setTitle("Modifier le salon de log");

const channelInput = new TextInputBuilder()
.setCustomId("channel_input")
.setLabel("Nouveau salon")
.setRequired(false)
.setStyle(TextInputStyle.Short);

const channelActionRow = new ActionRowBuilder().addComponents(
channelInput
);

modalChannel.addComponents(channelActionRow);

await interaction.showModal(modalChannel);

await interaction
.awaitModalSubmit({
filter,
time: 30000,
})
.then(async (int) => {
await int.deferUpdate().catch(() => {});
// ...
await i.channel
.awaitMessageComponent({
filter,
time: 30000,
})
.then(async (interaction) => {
const modalChannel = new ModalBuilder()
.setCustomId("channel_modal")
.setTitle("Modifier le salon de log");

const channelInput = new TextInputBuilder()
.setCustomId("channel_input")
.setLabel("Nouveau salon")
.setRequired(false)
.setStyle(TextInputStyle.Short);

const channelActionRow = new ActionRowBuilder().addComponents(
channelInput
);

modalChannel.addComponents(channelActionRow);

await interaction.showModal(modalChannel);

await interaction
.awaitModalSubmit({
filter,
time: 30000,
})
.then(async (int) => {
await int.deferUpdate().catch(() => {});
// ...
41 replies
DIAdiscord.js - Imagine an app
Created by Gykas on 7/17/2024 in #djs-questions
Modal collecting two responses
and
const filter = (int) => int.customId === interaction.id
const filter = (int) => int.customId === interaction.id
41 replies
DIAdiscord.js - Imagine an app
Created by Gykas on 7/17/2024 in #djs-questions
Modal collecting two responses
so i compare the id of the interaction and the id of the parent interaction ?
41 replies
DIAdiscord.js - Imagine an app
Created by Gykas on 7/17/2024 in #djs-questions
Modal collecting two responses
mb
41 replies