Reputation:
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);
Upvotes: 0
Views: 840
Reputation: 23161
.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));
Upvotes: 1