slack-api

How to send direct messages to a user as app in app channel

可紊 提交于 2019-11-26 14:16:20
问题 How is it possible to send message in slack directly to the user, by user.id as application. this application has scope: bot,channels:write,emoji:read,users:read,users:read.email I find how to send message only as DM or by webhooks, but there is no scope for that. Any one has idea? 回答1: If I understand your question correctly, you want to send direct messages to users in the app channel instead of the standard slackbot channel. In order to do that you need to Your app needs the bot scope and

Execute slash command as slack bot

泪湿孤枕 提交于 2019-11-26 14:08:06
问题 I'm writing a simple slack bot which should execute other slack commands upon being called. Everything is up and running, however the slack commands this bot issues don't seem to be executed. For instance my bot posts /giphy kitten every hour and the message appears just like that in the channel (so the sending side seems to work), but the slash command itself isn't executed. If I post the same command into the same channel myself it works as expected. Are bots not allowed to execute slash

Can i send custom properties/data in slack message attachments?

霸气de小男生 提交于 2019-11-26 12:48:37
问题 I want to send some custom properties in the attachment for interactive messages and retrieve them back in the action response. is there a way to do this? 回答1: Yes, that is possible. However, it only works well for small sets of data. Assuming we are talking about buttons the normal approach would be to use the value field of an action to transfer custom data based on which button the user clicked back to your app. The field is a normal string within a JSON message, which is send by POST

How to replace the buttons (attachment) only w/ Slack interactive buttons response

北城余情 提交于 2019-11-26 11:39:21
问题 I\'ve managed to create a simple interactive button Slack app using a Google Apps Script (GAS). I know how to replace the original message w/ the response, but I would like to replace only the buttons, as demonstrated (but not clearly explained) multiple places in the Slack Interactive Button documentation: https://api.slack.com/docs/message-buttons#crafting_your_message I\'d like to do what\'s demonstrated here: https://a.slack-edge.com/dcb1/img/api/message_guidelines/Example_6.gif Is this