props.run is not a function

Hello, I have the erroe props.run is not a function. It is shown directly at the Bots message. I don't really find things about it in the internet. Code:
const fs = require('fs');
const { Embed, EmbedBuilder } = require('discord.js');

const data = fs.readFileSync(`./pics.json`);
const pictureData = JSON.parse(data);

module.exports = {
name: 'guessthepicture',
description: 'Guess the picture game!',
execute(message) {

const randomIndex = Math.floor(Math.random() * pictureData.length);
const randomPicture = pictureData[randomIndex];

const embed = new EmbedBuilder()
.setColor('RANDOM')
.setTitle('Guess the Picture!')
.setImage(randomPicture.pictureLink);
message.channel.send({ embeds: [embed] });

const filter = (m) => m.author.id === message.author.id;
const collector = message.channel.createMessageCollector({ filter, time: 10000 });

collector.on('collect', (m) => {
if (m.content.toLowerCase() === randomPicture.answer.toLowerCase()) {
message.reply('Congratulations, you got it right!');
collector.stop();
} else {
message.reply('Sorry, that is not the correct answer. Try again!');
}
});

collector.on('end', () => {
message.reply(`Time's up! The correct answer was **${randomPicture.answer}**.`);
});
},
};
const fs = require('fs');
const { Embed, EmbedBuilder } = require('discord.js');

const data = fs.readFileSync(`./pics.json`);
const pictureData = JSON.parse(data);

module.exports = {
name: 'guessthepicture',
description: 'Guess the picture game!',
execute(message) {

const randomIndex = Math.floor(Math.random() * pictureData.length);
const randomPicture = pictureData[randomIndex];

const embed = new EmbedBuilder()
.setColor('RANDOM')
.setTitle('Guess the Picture!')
.setImage(randomPicture.pictureLink);
message.channel.send({ embeds: [embed] });

const filter = (m) => m.author.id === message.author.id;
const collector = message.channel.createMessageCollector({ filter, time: 10000 });

collector.on('collect', (m) => {
if (m.content.toLowerCase() === randomPicture.answer.toLowerCase()) {
message.reply('Congratulations, you got it right!');
collector.stop();
} else {
message.reply('Sorry, that is not the correct answer. Try again!');
}
});

collector.on('end', () => {
message.reply(`Time's up! The correct answer was **${randomPicture.answer}**.`);
});
},
};
13 Replies
d.js toolkit
d.js toolkit2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Cgx
CgxOP2y ago
this is in the index.js file.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Cgx
CgxOP2y ago
there's none props.run...
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Cgx
CgxOP2y ago
its the only command that makes the problem.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Cgx
CgxOP2y ago
hmm ok. And how do i fix that? what?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Cgx
CgxOP2y ago
There's no error in the console, just that one in the screenshot I send above.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Cgx
CgxOP2y ago
nvm I made it to fix. Thank you anyway.
Want results from more Discord servers?
Add your server