I'm trying to edit a message that's in another channel that the bot can see, when you use the command from another channel.
I tried using this method but it didn't work. What's the new method since this one is probably outdated?
client.channels.cache.get('Channel ID').fetchMessage('Message ID').edit(embed);
.fetchMessages()
is now .messages.fetch()
and it returns a promise:
client.channels.cache
.get('Channel ID')
.messages.fetch('Message ID')
.then((msg) => msg.edit(embed));
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.