Carved
Carved
DIAdiscord.js - Imagine an app
Created by Carved on 4/20/2024 in #djs-questions
Canvas
that was from command thanks btw
5 replies
DIAdiscord.js - Imagine an app
Created by Mockir on 4/16/2024 in #djs-questions
Button Collector
can i see interaction code
6 replies
DIAdiscord.js - Imagine an app
Created by ITcomputing on 4/14/2024 in #djs-questions
CollectorMessage
try them!
15 replies
DIAdiscord.js - Imagine an app
Created by ITcomputing on 4/14/2024 in #djs-questions
CollectorMessage
const filter2 = i2 => (i2.customId === 'activate_logs' || i2.customId === 'desactivate_logs') && i2.isButton() && i2.user.id === user.id;
const filter2 = i2 => (i2.customId === 'activate_logs' || i2.customId === 'desactivate_logs') && i2.isButton() && i2.user.id === user.id;
collector2.on('collect', async i3 => {
console.log("Button interaction collected:", i3.customId);
// Rest of your code
});
collector2.on('collect', async i3 => {
console.log("Button interaction collected:", i3.customId);
// Rest of your code
});
try to add this
15 replies
DIAdiscord.js - Imagine an app
Created by ITcomputing on 4/14/2024 in #djs-questions
CollectorMessage
.
15 replies
DIAdiscord.js - Imagine an app
Created by ITcomputing on 4/14/2024 in #djs-questions
CollectorMessage
maybe i can help u !
15 replies
DIAdiscord.js - Imagine an app
Created by ITcomputing on 4/14/2024 in #djs-questions
CollectorMessage
hmm for what you need collector explain everything
15 replies
DIAdiscord.js - Imagine an app
Created by ITcomputing on 4/14/2024 in #djs-questions
CollectorMessage
can u explain what are u coding ?
15 replies
DIAdiscord.js - Imagine an app
Created by Mara on 4/14/2024 in #djs-questions
Fetch a message by using the url
function parseDiscordUrl(url) {
const urlObject = new URL(url);
const path = urlObject.pathname;
const parts = path.split('/');
return {
guildID: parts[2],
channelID: parts[3],
messageID: parts[4]
};
}
function parseDiscordUrl(url) {
const urlObject = new URL(url);
const path = urlObject.pathname;
const parts = path.split('/');
return {
guildID: parts[2],
channelID: parts[3],
messageID: parts[4]
};
}
should like this !
7 replies
DIAdiscord.js - Imagine an app
Created by Mara on 4/14/2024 in #djs-questions
Fetch a message by using the url
7 replies
DIAdiscord.js - Imagine an app
Created by Mara on 4/14/2024 in #djs-questions
Fetch a message by using the url
const url = 'https://discord.com/channels/123456789012345678/123456789012345678/123456789012345678';
const url = 'https://discord.com/channels/123456789012345678/123456789012345678/123456789012345678';
7 replies
DIAdiscord.js - Imagine an app
Created by ITcomputing on 4/14/2024 in #djs-questions
CollectorMessage
await collector2.on('collect', async i3 => {
console.log("collector2 triggered");
console.log("Received custom ID:", i3.customId);

if (i3.customId === 'activate_logs') {
console.log("Activation button clicked");
await logConfig_model.findOneAndUpdate(
{ guildId: interaction.guild.id },
{ state: "on", logs: [] },
{ upsert: true }
);
await i3.reply({ content: "Activé", ephemeral: true });
} else if (i3.customId === 'desactivate_logs') {
console.log("Deactivation button clicked");

}
});
await collector2.on('collect', async i3 => {
console.log("collector2 triggered");
console.log("Received custom ID:", i3.customId);

if (i3.customId === 'activate_logs') {
console.log("Activation button clicked");
await logConfig_model.findOneAndUpdate(
{ guildId: interaction.guild.id },
{ state: "on", logs: [] },
{ upsert: true }
);
await i3.reply({ content: "Activé", ephemeral: true });
} else if (i3.customId === 'desactivate_logs') {
console.log("Deactivation button clicked");

}
});
try it
15 replies