nandub / hubot-irc

IRC adapter for Hubot
MIT License
299 stars 128 forks source link

Reply with notice on some commands #139

Closed Jaglag closed 7 years ago

Jaglag commented 10 years ago

Hi instead of reply in query with msg.sendPrivate a command for sending a notice would be nice to have!

its already in node irc:

Client.notice(target, message)

Sends a notice to the specified target.
Arguments:  

    target (string) – is either a nickname, or a channel.
    message (string) – the message to send as a notice to the target.
Jaglag commented 9 years ago

tried to notice with:

robot.adapter.notice {user: msg.message.user},

but he send a notice to channel except to user -.-

Jaglag commented 9 years ago

same with:

HUBOT_IRC_SEND_NOTICE_MODE set it to true

but the bot sends now all output to channel instead to the user who triggered the event or command

[17:40:21] [+Jaglag]: !bitcoin in eur [17:40:23] -Butlerz@#channel- EUR: 215.38 (H: 215.67 | L: 215.11)

Is there any workaround or something i can do? @parkr

parkr commented 7 years ago

It sounds like you need a way to send a notice to a user that does not go to a channel. I am curious why sendPrivate doesn't allow your use-case – perhaps you mean sending a private message to a user without being in the context of a message handler?

Jaglag commented 7 years ago

Hi parkr,

/notice message

Is a different kind of sending a message in irc. Private message open a private chat and the user have to klick on that private message window to read it. Normal channel message is a bit annoying when large response. Notice is the only way to don't annoying ppl in chat with large response and the comfort to don't switch to a different window.

chrisdotcode commented 7 years ago

Hi @Jaglag, this comment that uses robot.adapter.command should work for you if you replace MODE with notice.

If it doesn't, feel free to comment back, and I'll re-open.