你好,我想提到正在运行命令的用户,但我得到一个错误
这是代码!
const Discord = require("discord.js")
module.exports = {
name: 'not-dropping',
description: 'sets the dropping status!',
execute(message, args) {
if (message.channel.id === '1059798572855476245') {
message.delete(1000);
const name = ("dropping-🔴")
message.channel.setName(name)
message.channel.send(`Successfully set the dropping status to **${name}**n<@${msg.author.id}> is not Dropping anymore!nDont Ping Him in your Ticket.`)
}
}
}
我不明白问题是什么
如错误提示"msg">
在代码"{msg.author.id}"您正在使用MSG,而实际变量是"message"
修改为{message.author.id}
<msg"没有这样的用途>
你应该使用"message">
我更改了代码中需要更改的地方:)
const Discord = require("discord.js")
module.exports = {
name: 'not-dropping',
description: 'sets the dropping status!',
execute(message, args) {
if (message.channel.id === '1059798572855476245') {
message.delete(1000);
const name = ("dropping-🔴")
message.channel.setName(name)
message.channel.send(`Successfully set the dropping status to **${name}**n<@${message.author.id}> is not Dropping anymore!nDont Ping Him in your Ticket.`)
}
}
}