Slack Developer Kit for Node.js
Go to GitHub

ChannelsFacet

Kind: global class

channelsFacet.archive(channel, [optCb])

Archives a channel.

Kind: instance method of [ChannelsFacet](#ChannelsFacet)
See: channels.archive

Param Type Description
channel ? Channel to archive
[optCb] function Optional callback, if not using promises.

channelsFacet.create(name, [optCb])

Creates a channel.

Kind: instance method of [ChannelsFacet](#ChannelsFacet)
See: channels.create

Param Type Description
name ? Name of channel to create
[optCb] function Optional callback, if not using promises.

channelsFacet.history(channel, [opts], [optCb])

Fetches history of messages and events from a channel.

Kind: instance method of [ChannelsFacet](#ChannelsFacet)
See: channels.history

Param Type Description
channel ? Channel to fetch history for.
[opts] Object  
opts.latest ? End of time range of messages to include in results.
opts.oldest ? Start of time range of messages to include in results.
opts.inclusive ? Include messages with latest or oldest timestamp in results.
opts.count ? Number of messages to return, between 1 and 1000.
opts.unreads ? Include unread_count_display in the output?
[optCb] function Optional callback, if not using promises.

channelsFacet.info(channel, [optCb])

Gets information about a channel.

Kind: instance method of [ChannelsFacet](#ChannelsFacet)
See: channels.info

Param Type Description
channel ? Channel to get info on
[optCb] function Optional callback, if not using promises.

channelsFacet.invite(channel, user, [optCb])

Invites a user to a channel.

Kind: instance method of [ChannelsFacet](#ChannelsFacet)
See: channels.invite

Param Type Description
channel ? Channel to invite user to.
user ? User to invite to channel.
[optCb] function Optional callback, if not using promises.

channelsFacet.join(name, [optCb])

Joins a channel, creating it if needed.

Kind: instance method of [ChannelsFacet](#ChannelsFacet)
See: channels.join

Param Type Description
name ? Name of channel to join
[optCb] function Optional callback, if not using promises.

channelsFacet.kick(channel, user, [optCb])

Removes a user from a channel.

Kind: instance method of [ChannelsFacet](#ChannelsFacet)
See: channels.kick

Param Type Description
channel ? Channel to remove user from.
user ? User to remove from channel.
[optCb] function Optional callback, if not using promises.

channelsFacet.leave(channel, [optCb])

Leaves a channel.

Kind: instance method of [ChannelsFacet](#ChannelsFacet)
See: channels.leave

Param Type Description
channel ? Channel to leave
[optCb] function Optional callback, if not using promises.

channelsFacet.list([opts], [optCb])

Lists all channels in a Slack team.

Kind: instance method of [ChannelsFacet](#ChannelsFacet)
See: channels.list

Param Type Description
[opts] Object  
opts.exclude_archived ? Don’t return archived channels.
[optCb] function Optional callback, if not using promises.

channelsFacet.mark(channel, ts, [optCb])

Sets the read cursor in a channel.

Kind: instance method of [ChannelsFacet](#ChannelsFacet)
See: channels.mark

Param Type Description
channel ? Channel to set reading cursor in.
ts ? Timestamp of the most recently seen message.
[optCb] function Optional callback, if not using promises.

channelsFacet.rename(channel, name, [optCb])

Renames a channel.

Kind: instance method of [ChannelsFacet](#ChannelsFacet)
See: channels.rename

Param Type Description
channel ? Channel to rename
name ? New name for channel.
[optCb] function Optional callback, if not using promises.

channelsFacet.replies(channel, thread_ts, [optCb])

Retrieve a thread of messages posted to a channel.

Kind: instance method of [ChannelsFacet](#ChannelsFacet)
See: channels.replies

Param Type Description
channel ? Channel to fetch thread from
thread_ts ? Unique identifier of a thread’s parent message.
[optCb] function Optional callback, if not using promises.

channelsFacet.setPurpose(channel, purpose, [optCb])

Sets the purpose for a channel.

Kind: instance method of [ChannelsFacet](#ChannelsFacet)
See: channels.setPurpose

Param Type Description
channel ? Channel to set the purpose of
purpose ? The new purpose
[optCb] function Optional callback, if not using promises.

channelsFacet.setTopic(channel, topic, [optCb])

Sets the topic for a channel.

Kind: instance method of [ChannelsFacet](#ChannelsFacet)
See: channels.setTopic

Param Type Description
channel ? Channel to set the topic of
topic ? The new topic
[optCb] function Optional callback, if not using promises.

channelsFacet.unarchive(channel, [optCb])

Unarchives a channel.

Kind: instance method of [ChannelsFacet](#ChannelsFacet)
See: channels.unarchive

Param Type Description
channel ? Channel to unarchive
[optCb] function Optional callback, if not using promises.