node-irc icon indicating copy to clipboard operation
node-irc copied to clipboard

Get in what channel the message was received.

Open itsfolf opened this issue 9 years ago • 1 comments

How can I get in what channel a message was received in the "message" listener.

itsfolf avatar May 29 '16 00:05 itsfolf

As per the docs you can do it as

handleMessageEvent(nick, to, text) {
    if (to.indexOf('#') === 0) // it's a channel message, to has the channel name
    // ...
}
client.addListener('message', handleMessageEvent);

moshmage avatar Jun 02 '16 09:06 moshmage