Multiple création

Hello, I am creating a sports race manager and I am currently encountering a problem. When I create the first race everything goes well but when I create more races they are created several times (example: the 4th race created is created 4 times, the 5th 5 times, etc.) here are the diferents that are related to this problem. Thanks in advance. discord.js version : 14.12.1 | node version : v20.5.1 course.js :
const {
SlashCommandBuilder,
ButtonBuilder,
ActionRowBuilder,
} = require('discord.js');

const Infocourse = require('../fonctions/Infocourse.js');

module.exports = {

data: new SlashCommandBuilder().setName('créer-course').setDescription('Crée une course'),

async execute(interaction) {
const buttoncourse = new ButtonBuilder()
.setCustomId('buttoncourse')
.setLabel('🛶créer une course🛶')
.setStyle('Primary');

const buttonRow = new ActionRowBuilder().addComponents(buttoncourse);

await interaction.reply({
content: `⬇️ Clicker pour commencer à créer une course ⬇️`,
components: [buttonRow],
});
await Infocourse.execute(interaction);
}
};
const {
SlashCommandBuilder,
ButtonBuilder,
ActionRowBuilder,
} = require('discord.js');

const Infocourse = require('../fonctions/Infocourse.js');

module.exports = {

data: new SlashCommandBuilder().setName('créer-course').setDescription('Crée une course'),

async execute(interaction) {
const buttoncourse = new ButtonBuilder()
.setCustomId('buttoncourse')
.setLabel('🛶créer une course🛶')
.setStyle('Primary');

const buttonRow = new ActionRowBuilder().addComponents(buttoncourse);

await interaction.reply({
content: `⬇️ Clicker pour commencer à créer une course ⬇️`,
components: [buttonRow],
});
await Infocourse.execute(interaction);
}
};
Infocourse.js : 1st attached piece createCourse.js : 2de attached piece
1 Reply
d.js toolkit
d.js toolkit16mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Want results from more Discord servers?
Add your server