let giveawayDuration = response2.first();
// Limit duration to max 15d
if (giveawayDuration > ms('15d')) {
const l1 = new Discord.MessageEmbed()
.setColor('#ff0000')
.setDescription(❌ Your duration cannot be more than 15 Days!)
return message.channel.send(l1);
}
为什么每次持续时间都会阻塞,有人知道为什么我做错了什么吗?
const ms = require('ms');
const response2 = await message.channel. awaitMessages(m => m.author.id === message.author.id, { max: 1 });
解决办法是:"ms(giveawayDuration.content) > ms('15d')"