Closed Aim23 closed 6 years ago
The discordSendMessage node requires there to be a channel
property on incoming messages, which should either be a Channel ID or an object with an 'id' key. Such a property is automatically added to messages emitted by the discordMessage node. If there's no such property available, you must specify the channel ID in the discordSendMessage node's configuration.
Probably, what's happening is that the messages received by the discordSendMessage node don't have a channel
property. This can happen when, for instance, you've wired in a function node that sends a completely new message (node.send({payload: 'Hello!'})
) instead of cloning the original message and sending it (var newMessage = Object.assign({payload: 'Hello!'}, msg); node.send(newMessage);
).
Can you verify that the messages received by your discordSendMessage node have a channel
property on them?
Alright, got that concept!
Object.assign didn't worked out for me, had to put {payload: function(), channel: msg.channel, author: msg.author}
. This is working now pretty well 👍 :)
I'm not able to receive messages in a channel, if there is no channel ID present. If a channel ID is present it is working flawlessly. Any suggestions?