You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've searched for any related issues and avoided creating a duplicate issue.
Question
Filling out the following details about bugs will help us solve your issue sooner.
Reproducible in:
hubot-slack version: 4.5.4
node version: 8.11.3
Question
I was attempting to follow the example in the documentation here: https://slackapi.github.io/hubot-slack/basic_usage#message-reactions which seems to use the WebClient to add a reaction. Rather than responding to a reaction like that example does, I'm trying to respond to a message.
Here is the code I have so far:
{WebClient} = require "@slack/client"
module.exports = (robot) ->
if robot.adapter.options && robot.adapter.options.token
web = new WebClient robot.adapter.options.token
robot.hear /Monitor is DOWN/i, (msg) ->
robot.logger.info "attempting to react. name:'serverdown', channel: #{msg.message.rawMessage.channel}, timestamp: #{msg.message.rawMessage.ts}"
web.reactions.add
name: 'serverdown',
channel: "#{msg.message.rawMessage.channel}",
timestamp: "#{msg.message.rawMessage.ts}"
But I keep getting errors like the following:
error: Response not OK: invalid_array_arg
Unhandled rejection Error: invalid_array_arg
Am I doing something wrong, or is there a bug here?
The text was updated successfully, but these errors were encountered:
@deathau: the code you're using looks correct to me, but there's one gotcha that's actually noted in this section: https://slackapi.github.io/hubot-slack/basic_usage#using-the-slack-web-api. that is, you should npm install @slack/client in your app in order to get this to work. the problem is that there's an older version of @slack/client available to node since hubot-slack depends on it, but the latest version is what you want to use. let me know if that fixes the issue 😄
aoberoi
added
question
M-T: User needs support to use the project
needs info
An issue that is claimed to be a bug and hasn't been reproduced, or otherwise needs more info
labels
Oct 1, 2018
Description
What is the correct way to add a reaction to a heard message?
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)Question
Filling out the following details about bugs will help us solve your issue sooner.
Reproducible in:
hubot-slack version: 4.5.4
node version: 8.11.3
Question
I was attempting to follow the example in the documentation here: https://slackapi.github.io/hubot-slack/basic_usage#message-reactions which seems to use the WebClient to add a reaction. Rather than responding to a reaction like that example does, I'm trying to respond to a message.
Here is the code I have so far:
But I keep getting errors like the following:
Am I doing something wrong, or is there a bug here?
The text was updated successfully, but these errors were encountered: