I have written a command with which the bot should react to another message. The command is reacted to, the code is correct as far as it goes, but this is what comes from the bot:
TypeError: msg.react is not a function
Is this not possible from the API, or is the code wrong?
Code:
if (message.member.hasPermission('MANAGE_CHANNELS')) {
const args = message.content.slice(prefix.length).trim().split(' ');
const messages = args[1]
const emoji = args[2]
const msg = message.channel.messages.fetch(messages)
msg.react(emoji)
}