我希望我的机器人能够向某人发送
args[1]
的直接消息,次数是args[2]
。 我认为这应该很简单,但迄今为止我还没有找到方法。 这是我目前的代码:module.exports = {
name: 'message',
description: 'message',
execute(message, args) {
let recipient = message.mentions.users.first()
if (message.author.id === 'My ID') {
recipient.send(args[1])
}
if ((!args[1])) return message.channel.send('Please include the message you want to send.')
if (isNaN(args[2])) return message.channel.send('Please include how many times you want the message to send.')
}
}