slack

How can I get my bot to ignore conversation until it is addressed directly?

心不动则不痛 提交于 2019-12-02 16:53:16
问题 I want to add my bot to a Slack channel. But I want it to ignore conversation until it is addressed directly, e.g.: me: hi! me: hi! me: @bot hi! bot: why hello there! In Microsoft Bot Framework v1, there was an option: "Listen to all messages". I don't see that option in v3. Is there a simple way to do this (i.e. without analyzing every utterance to see whether the bot was addressed)? I'm using node.js botbuilder 3.1. 回答1: While checking the activity text is certainly a valid option, I would

How can I get my bot to ignore conversation until it is addressed directly?

元气小坏坏 提交于 2019-12-02 13:44:19
I want to add my bot to a Slack channel. But I want it to ignore conversation until it is addressed directly, e.g.: me: hi! me: hi! me: @bot hi! bot: why hello there! In Microsoft Bot Framework v1, there was an option: "Listen to all messages". I don't see that option in v3. Is there a simple way to do this (i.e. without analyzing every utterance to see whether the bot was addressed)? I'm using node.js botbuilder 3.1. While checking the activity text is certainly a valid option, I would instead use the Mentions capabilities provided by the library (at least in C#). if (activity.GetMentions()

Only Primary Owner can post Message on Slack

安稳与你 提交于 2019-12-02 08:07:10
I have a Slack App and Workspace. Since I am the admin, I can post the message to anyone and to any channel. But, when I am trying to post a message as a different user through an api call using the method chat.postMessage, it gives me the following response. {"ok":false,"error":"missing_scope","needed":"chat:write:user","provided":"identity.basic,identity.email,identity.avatar,identity.team","warning":"missing_charset","response_metadata":{"warnings":["missing_charset"]}} I checked the Oauth and Permissions page on Slack and I have the scope as chat:write:user. I cannot figure out what to do

Slack API send commands via webhook

我与影子孤独终老i 提交于 2019-12-02 06:02:09
问题 I am not sure if what I am trying to do is even possible. I have a Slack App and via that SlackApp I want to control another Slack App which is not mine. That's probably too abstract, so let's get into detail: There is the SlackApp Foodtrain. If you are a user you just type "/lunchtrain Location Time" and it does it's job. I want my App to activate a Lunchtrain but if I just send a Message via Webhook thats '/lunchtrain Location Time' it doesn't activate the command. You can see it in

How do I prevent my Slack slash command from echoing into the channel?

谁说胖子不能爱 提交于 2019-12-02 01:11:43
问题 Using Serverless and NodeJS, I have a Slack command set up like: /myCommand doStuff When I type /myCommand doStuff , the Slack output does this: /myCommand doStuff The content of the actual response I want shown goes here. What I want to do is only have this: The content of the actual response I want shown goes here. without the /myCommand doStuff getting echoed. How do I prevent that from happening? Update - adding some code Here's the actual command: module.exports = () => { return new

Slack - Get thread id after posting message using incoming web hook

◇◆丶佛笑我妖孽 提交于 2019-12-01 23:27:56
问题 I am using slack incoming web hook to post message to a channel. Here is my code curl -X POST \ https://hooks.slack.com/services/TXXXXXXXX/BXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXX \ -H 'Content-Type: application/json' \ -d '{ "text": "Test message" }' I am getting ok as response. I need thread id( thread_ts or ts ) to reply to that thread. How can I get thread id while posting message to slack using incoming web hooks 回答1: Webhooks will not return IDs for your message. So you don't get the thread

Slack - Get thread id after posting message using incoming web hook

我是研究僧i 提交于 2019-12-01 21:44:32
I am using slack incoming web hook to post message to a channel. Here is my code curl -X POST \ https://hooks.slack.com/services/TXXXXXXXX/BXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXX \ -H 'Content-Type: application/json' \ -d '{ "text": "Test message" }' I am getting ok as response. I need thread id( thread_ts or ts ) to reply to that thread. How can I get thread id while posting message to slack using incoming web hooks Webhooks will not return IDs for your message. So you don't get the thread_ts and ts , which you both need to reply as thread. Its technically possible to find your message through

How to mention @channel(All the team members) using slack api while post message

僤鯓⒐⒋嵵緔 提交于 2019-12-01 16:31:38
I want to post a message in slack using api. How can I mention all the team members of a channel just like @channel in slack? You can use <!channel> . Example You can see all the possible @mentions in Slack documentation under Variables 来源: https://stackoverflow.com/questions/36795403/how-to-mention-channelall-the-team-members-using-slack-api-while-post-message

How to delete/disable user through slack API?

寵の児 提交于 2019-12-01 07:45:30
问题 I have tried multiple approaches to this. Tried first getting the user without any user id - this returns me just my user, then tried getting user with other id's and it also retrieves data correctly. However, I can't seem to be able to set user attribute 'deleted'. i'm using this python approach. slack_client.api_call('users.profile.set', deleted=True, user='U36D86MNK') However I get the error message of: {u'error': u'invalid_user', u'ok': False} Maybe someone has already done this? It says

Slack webhook - Which IPs should I open?

时光怂恿深爱的人放手 提交于 2019-12-01 02:37:04
We want to use Slack Webhook (Outgoing Webhook) with an internal web service. Our company is behind a firewall, so outside connections must be whitelisted. It appears that Slack has multiple addresses it will send the API request from, and they don't seem to be documented. Which IPs/Ports should we open in the firewall (whitelist) in order to allow slack's outgoing webhooks to connect to our internal web service? An alternative could be using a VPN tunnel service to expose your internal webserver the Internet, e.g. with ngrok . I can confirm it works with Slack (I use it every day for Slack