这个命令经常被垃圾邮件发送,似乎正在破坏bot
bot.on('message', msg=>{
if(msg.content === "h"){
msg.channel.send('hㅤ');
}
})
再说一遍,我该如何为这个命令添加冷却时间呢?我使用的是discord.js,我不知道如何添加冷却时间。
这个网站应该能帮到你。https://discordjs.guide/command-handling/adding-features.html#冷却时间