繁体   English   中英

我不明白代码应该做什么?

[英]I don't understand what the code is suppose to do?

module.exports = (client, message, args) => { 
  message.reply("Pong!");
}

它在回复什么? 我真的不明白代码应该做什么,因为它说的是“message.reply”,但它应该回复什么消息?

在通道中发送的消息字符串,

例如,如果您发送“嘿,我正在这个 discord 频道发送此消息”,则message

module.exports = (client, "message", args) => { 
...
}

message.reply()中的message变量就是上面module.exports function 中的message变量。

当您将所有这些放在一起时, message.reply("")将使用您放在.reply(""); .

例子:

message.reply("Replying to this message"); 将回复频道中发送的消息,字符串为"Replying to this message"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM