Slack Developer Kit for Node.js
Kind: global class
Deletes a message.
Kind: instance method of [ChatFacet](#ChatFacet)
See: chat.delete
| Param | Type | Description |
|---|---|---|
| ts | ? |
Timestamp of the message to be deleted. |
| channel | ? |
Channel containing the message to be deleted. |
| [opts] | Object |
|
| opts.as_user | ? |
Pass true to delete the message as the authed user. Bot users in this context are considered authed users. |
| [optCb] | function |
Optional callback, if not using promises. |
Share a me message into a channel.
Kind: instance method of [ChatFacet](#ChatFacet)
See: chat.meMessage
| Param | Type | Description |
|---|---|---|
| channel | ? |
Channel to send message to. Can be a public channel, private group or IM channel. Can be an encoded ID, or a name. |
| text | ? |
Text of the message to send. |
| [optCb] | function |
Optional callback, if not using promises. |
Sends an ephemeral message to a user in a channel.
Kind: instance method of [ChatFacet](#ChatFacet)
See: chat.postEphemeral
| Param | Type | Description |
|---|---|---|
| channel | ? |
Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See below for more details. |
| text | ? |
Text of the message to send. See below for an explanation of formatting. This field is usually required, unless you’re providing only attachments instead. |
| user | ? |
id of the user who will receive the ephemeral message. The user should be in the channel specified by the channel argument. |
| [opts] | Object |
|
| opts.parse | ? |
Change how messages are treated. Defaults to none. See below. |
| opts.link_names | ? |
Find and link channel names and usernames. |
| opts.attachments | ? |
Structured message attachments. |
| opts.as_user | ? |
Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See authorship below. |
| [optCb] | function |
Optional callback, if not using promises. |
Sends a message to a channel.
Kind: instance method of [ChatFacet](#ChatFacet)
See: chat.postMessage
| Param | Type | Description |
|---|---|---|
| channel | ? |
Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See below for more details. |
| text | ? |
Text of the message to send. See below for an explanation of formatting. This field is usually required, unless you’re providing only attachments instead. |
| [opts] | Object |
|
| opts.parse | ? |
Change how messages are treated. Defaults to none. See below. |
| opts.link_names | ? |
Find and link channel names and usernames. |
| opts.attachments | ? |
Structured message attachments. |
| opts.unfurl_links | ? |
Pass true to enable unfurling of primarily text-based content. |
| opts.unfurl_media | ? |
Pass false to disable unfurling of media content. |
| opts.username | ? |
Set your bot’s user name. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below. |
| opts.as_user | ? |
Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See authorship below. |
| opts.icon_url | ? |
URL to an image to use as the icon for this message. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below. |
| opts.icon_emoji | ? |
emoji to use as the icon for this message. Overrides icon_url. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below. |
| [optCb] | function |
Optional callback, if not using promises. |
Updates a message.
Kind: instance method of [ChatFacet](#ChatFacet)
See: chat.update
| Param | Type | Description |
|---|---|---|
| ts | ? |
Timestamp of the message to be updated. |
| channel | ? |
Channel containing the message to be updated. |
| text | ? |
New text for the message, using the default formatting rules. |
| [opts] | Object |
|
| opts.attachments | ? |
Structured message attachments. |
| opts.parse | ? |
Change how messages are treated. Defaults to client, unlike chat.postMessage. See below. |
| opts.link_names | ? |
Find and link channel names and usernames. Defaults to none. This parameter should be used in conjunction with parse. To set link_names to 1, specify a parse mode of full. |
| opts.as_user | ? |
Pass true to update the message as the authed user. Bot users in this context are considered authed users. |
| [optCb] | function |
Optional callback, if not using promises. |
Unfurl a URL within a message by defining its message attachment.
Kind: instance method of [ChatFacet](#ChatFacet)
See: chat.unfurl
| Param | Type | Description |
|---|---|---|
| ts | ? |
Timestamp of the message to be updated. |
| channel | ? |
Channel of the message to be updated. |
| unfurls | string |
a map of URLs to structured message attachments |
| [opts] | Object |
|
| opts.user_auth_required | ? |
Pass true to require user authorization. |
| [optCb] | function |
Optional callback, if not using promises. |
Retrieve a permalink URL for a specific extant message.
Kind: instance method of [ChatFacet](#ChatFacet)
See: chat.getPermalink
| Param | Type | Description |
|---|---|---|
| channel | ? |
The ID of the conversation or channel containing the message. |
| ts | ? |
A message’s ts value, uniquely identifying it within a channel. |
| [optCb] | function |
Optional callback, if not using promises. |