Androz2091 / discord-giveaways

🎉 Complete framework to facilitate the creation of giveaways using discord.js
https://discord-giveaways.js.org
MIT License
335 stars 127 forks source link

winnerCount is not a positive integer. (val=undefined) #443

Closed scaryMikrowelle closed 2 years ago

scaryMikrowelle commented 2 years ago

So, i know that there has been several bugs or questions just like this, but when I use the parseInt (also did a typeof, it was a number) it still won't work. My code:

The Command option: { name: 'winners', description: 'Select a amount of winners for this giveaway', type: 'INTEGER', required: true, },

The start case: `{ const gchannel = options.getChannel('channel') || interaction.channel; const duration = options.getString('duration'); const winnnerCount = options.getInteger('winners'); const prize = options.getString('prize');

client.giveawaysManager .start(gchannel, { duration: ms(duration), winnnerCount, prize, messages: { inviteToParticipate: '', winMessage: 'Congratulations, {winners}! You won {this.prize}!', }, }) .then(async () => { successEmbed.setDescription('Giveaway was successfully started.'); return interaction.reply({ embeds: [successEmbed], ephemeral: true, }); }); } break;`

scaryMikrowelle commented 2 years ago

I was dumb and had a typo