我试图在发送消息几秒钟后删除该消息。我注意到我的 Discord v.12 代码不再起作用。有人能告诉我替代品.then(m => m.delete({ timeout: 3000 }))是什么吗?
我的 v.12 代码:
else if (parts[0] == prefix + 'c') {
if (!message.member.hasPermission('MANAGE_MESSAGES')) return message.channel.send("You don't have permission to do that!")
if (!parts[1]) return message.channel.send('You forgot the number').then(m => m.delete({ timeout: 3000 }))
if (isNaN(parts[1])) return message.channel.send('You need a number').then(m => m.delete({ timeout: 3000 }))
if (parts[1] > 100) return message.channel.send("You can't delete more than 100 messages").then(m => m.delete({ timeout: 3000 }))
if (parts[1] < 2) return message.channel.send('You need …Run Code Online (Sandbox Code Playgroud)