Comments (4)
Yes, you can, and it is implemented.
bot.postMessageToUser('username', 'hello', {
"attachments": [
{
"fallback": "Required plain-text summary of the attachment.",
"color": "#36a64f",
"pretext": "Optional text that appears above the attachment block",
"author_name": "Bobby Tables",
"author_link": "http://flickr.com/bobby/",
"author_icon": "http://flickr.com/icons/bobby.jpg",
"title": "Slack API Documentation",
"title_link": "https://api.slack.com/",
"text": "Optional text that appears within the attachment",
"fields": [
{
"title": "Priority",
"value": "High",
"short": false
}
],
"image_url": "http://my-website.com/path/to/image.jpg",
"thumb_url": "http://example.com/path/to/thumb.png"
}
]
});
from slack-bot-api.
As I know, Slack RTM API doesn't support this feature
from slack-bot-api.
At least for images according to https://api.slack.com/docs/attachments You could use technique, where You upload the file somewhere and then reference it in Your message's attachment.
from slack-bot-api.
Thanks. You are right.
from slack-bot-api.
Related Issues (20)
- postMessageToUser does not Work HOT 1
- Promise returns undefined
- [Node 12] [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
- How to prevent the bot auto disconnect? HOT 15
- Sorry if I have asked a stupid question: const EventEmitter = require('events'); vs var EventEmitter = require('events').EventEmitter; HOT 1
- Setting bot's profile image HOT 1
- How to start a thread and send message under that thread?
- Send an image? HOT 1
- Tokens created with Slack’s new granular permissions generate a `not_allowed_token_type` error. HOT 13
- Issue with deploying to cloud foundry HOT 1
- [ERROR] not_allowed_token_type error on new bot app HOT 18
- Can't find a way to identify messages that are '@' the bot. HOT 1
- SyntaxError: Unexpected token < in JSON at position 0 HOT 1
- Error: Uncaught error: ratelimited
- Why appending "+" to every whitespace?
- Facing error in connection of uipath and Slack HOT 4
- Slack rtm.start() deprecation HOT 2
- Slack's update in `connect.start` API breaks the `slackbots` package HOT 1
- The new endpoint `conversations.list` is paginated
- Lib gets only first page of paginated endpoints
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slack-bot-api.