discord-giveaways: RangeError: Maximum call stack size exceeded
This error happens when I am trying to do role requirements.
Here is my role requirement code
else if(yesreq){
await bot.giveawaysManager.start(message.channel, {
time: ms(giveawayDuration),
prize: giveawayPrize,
winnerCount: giveawayWinners,
extraData: {
Role: yesreq
},
});
}
My event:
manager.on('giveawayReactionAdded', (giveaway, member, reaction) => {
let hey = giveaway.extraData.Role.slice(3, -1)
if (!member.roles.cache.some(hey)) {
reaction.users.remove(member.user);
const hostembed = new Discord.MessageEmbed()
.setTitle(`:x:`)
.setColor('RED')
member.send(hostembed).
})
}
});
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 34 (5 by maintainers)
Thank you, it is working perfectly now! I am really sorry I wasted your time to help me, it’s my fault, I should’ve looked carefully.