问题描述
我正在尝试让我的机器人对频道中的特定消息做出反应.这是我到目前为止的代码:
I'm trying to make my bot react to a specific message in a channel. This is the code I have so far:
message.fetch(`messageID`).then(message => { message.react(`emoji`); });
推荐答案
要获取特定消息,您至少必须先获取它的频道:
To fetch a specific message you must at least fetch it's channel before :
message.client.channels.fetch("channelID").then(channel => { channel.messages.fetch("messageID").then(message => { message.react("emoji"); } }