slack

Read-only Slack channel [closed]

有些话、适合烂在心里 提交于 2019-12-10 12:43:43
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . Is it possible to configure a Slack channel to be public but read-only for all and only e.g. Jenkins user can write messages in it? (Apologies if it is off-topic for SO) 回答1: Edit: seems like the bot has been retired. Please see comments. It sounds like you may want to use the block functionality provided by

How to get variables from slack custom command into param

眉间皱痕 提交于 2019-12-10 11:19:53
问题 I wrote a node app that takes a d param and responds with a random dice roll: https://{some app}.herokuapp.com/roll/dice?d=20 The user can also add a number to the end of the dice roll like: https://{some app}.herokuapp.com/roll/dice?d=20&a=5 The api works fine. I am trying to get this to integrate with slack so that users can type /roll 20 or /roll 20 5 but I am unable to figure out how to get variables into the params. How do I pass those variables into the custom command? Here is a

Confirming AWS SNS Topic Subscription for Slack Webhook

谁说胖子不能爱 提交于 2019-12-08 19:13:55
问题 I am integrating SNS and Slack. I have created a slack app with incoming webhook enabled. I have got the webhook URL. I created a subscription for a SNS Topic with HTTPS protocol and set the Endpoint the webhookURL. Now the subscription is PendingConfirmation. I didnot receive any confirmation message, not in the destined channel. How do I confirm the subscription? 回答1: The reason you're not seeing it in Slack is because the default JSON format for SNS messages doesn't conform to the format

Testing Slack Interactive Messages Locally

主宰稳场 提交于 2019-12-08 04:09:05
问题 I'm currently using SlackConnector Repo https://github.com/noobot/SlackConnector. I've created a bot and it sends interactive messages to my chat. I would like to add functionality to my interactive buttons but upon clicking them i get this response. Darn – that didn’t work. Only Slack Apps can add interactive elements to messages. Manage your apps here: https://api.slack.com/apps/ So it looks like I need a request URL to get my past my current roadblock. Is there a way to Test the

os.environ.get() does not return the Environment Value in windows?

守給你的承諾、 提交于 2019-12-08 01:59:38
问题 I already set SLACK_TOKEN environment Variable. But "SLACK_TOKEN=os.environ.get('SLACK_TOKEN')" is returning "None". The type of SLACK_TOKEN is NoneType . I think os.environ.get not fetching value of environment variable. so rest of the code is not executing. import os from slackclient import SlackClient SLACK_TOKEN= os.environ.get('SLACK_TOKEN') #returning None print(SLACK_TOKEN) # None print(type(SLACK_TOKEN)) # NoneType class slack_client = SlackClient(SLACK_TOKEN) print(slack_client.api

Testing Slack Interactive Messages Locally

不问归期 提交于 2019-12-07 14:32:37
I'm currently using SlackConnector Repo https://github.com/noobot/SlackConnector . I've created a bot and it sends interactive messages to my chat. I would like to add functionality to my interactive buttons but upon clicking them i get this response. Darn – that didn’t work. Only Slack Apps can add interactive elements to messages. Manage your apps here: https://api.slack.com/apps/ So it looks like I need a request URL to get my past my current roadblock. Is there a way to Test the Interactive Message button locally? List<SlackAttachment> attachments = new List<SlackAttachment>(); List

Slack DM to a user not in `im.list`

孤者浪人 提交于 2019-12-07 01:48:43
问题 I'm implementing a slack ops bot that will notify users of job completion on a build server. It needs to be able to DM users on job completion. I've setup a bot user as per the instructions @ https://api.slack.com/bot-users. To send a DM to a particular user, chat.postMessage takes the first argument (channel) as either a @username or a IM channel's ID as per the documentation @ https://api.slack.com/methods/chat.postMessage#channels . To get the IM channel ID of a user, im.list can be used.

Laravel Logging to Slack Workbook causes “Curl error (code 3): <url> malformed”

a 夏天 提交于 2019-12-06 14:48:19
I just set up a webhook in Slack to send logging to from my Laravel app. When the log line executes, this error pops up: RuntimeException Curl error (code 3): <url> malformed Source: vendor\monolog\monolog\src\Monolog\Handler\Curl\Util.php { while ($retries--) { if (curl_exec($ch) === false) { $curlErrno = curl_errno($ch); if (false === in_array($curlErrno, self::$retriableErrorCodes, true) || !$retries) { $curlError = curl_error($ch); if ($closeAfterDone) { curl_close($ch); } throw new \RuntimeException(sprintf('Curl error (code %s): %s', $curlErrno, $curlError)); } continue; } if (

Create and get new channel incoming webhook in slack

断了今生、忘了曾经 提交于 2019-12-06 11:45:53
问题 I just created a channel via Slack Api using channels.create method. How do I add incoming webhook and get the URL programmatically? I have other tools that will use it further. 回答1: You can not create new incoming webhooks programmatically, but you don't have to. Just override the channel property on an existing incoming webhook for your current Slack team to use the new channel. Example: { "text": "This is a line of text.\nAnd this is another one.", "channel": "channel-name" } Note that

Slack Event API for Bot Mentions

╄→尐↘猪︶ㄣ 提交于 2019-12-06 11:15:39
问题 I'm building a Slack bot using a Slack App. I have managed to authorise and am successfully receiving events via the Event API. I'm trying to find out how to listen only for direct mentions of the bot. Therefore it should fire an event when someone messages a public or private channel AND when the bot is directly tagged like @bot Public/private Slack Channel Example: Daniel: Hi there bot (does not trigger) Jeremy: @bot hi there (triggers Event API) Is there a Slack Event that does this? Or is