I have a discord bot using djs with over 216 commands and i was trynna make a giveaway command without using discord-giveways npm
I have tried asking many many people for solutions and everyone has said that they dont know. I looked on google, not a single useful answer. I would appreciate it if someone could help me out on this
I get this error:
throw new DiscordAPIError(data, res.status, request);
^
DiscordAPIError: Invalid Form Body
message_id: Value "10s" is not snowflake.
This happens when i run the giveaway. it works fine till it ends, once it ends this error occurs before i even try to reroll the giveaway
if i change the args from 1 and 2 to 2 and 3 it will say unknown message
if(args[1].toLowerCase() === "reroll" && message.member.permissions.has("MANAGE_GUILD") || message.member.roles.cache.find(r=> r.name === "Giveaway Manager")) {
let messageID = message.channel.messages.fetch(args[2])
if(!messageID) return message.reply({embeds: [new Discord.MessageEmbed()
.setColor(colours.pink)
.setTitle(`${emotes.Error} MISSING ARGUEMENT`)
.setDescription("*Bakaa~* You need to provide a message ID for me to reroll!")
.setTimestamp()
], allowedMentions: {repliedUser: false}
})
if(messageID) {
for (let i = 0; i < winnerCount; i++) {
index2 = Math.floor(Math.random() * (participants.length -1));
if(!RerolledWinners.includes(participants[index2])) {
RerolledWinners.push(participants[index2]);
} else i--;
}