Yea, I need help on the Setup Command for my discord bot.
Hers the output for it:
"\n\"cookie\": \"\",\n\"groupId\": 0,\n\"maximumRank\": 0,\n\"shiftmessage\": \"\",\n\"trainingmessage\": \"\"\n```"
const filter = m => m.author.id === message.author.id
const collector = message.channel.createMessageCollector(filter, { max: '1', maxMatches: "1", time: "200000" })
collector.on('collect', msg => {
if(msg.content){
fs.writeFile('./config.json', JSON.stringify(msg.content), (err) => {
if(err){
return SendSetupMessage("Error",err,'RED')
}
})
}
})
}
Is there any way to fix it?
The setup command is for when a user setups up the bots settings, etc.