Learn R Programming

slackr (version 1.4.2)

slackr_chtrans: Translate vector of channel names to channel ID's for API

Description

Given a vector of one or more channel names, it will retrieve list of active channels and try to replace channels that begin with "#" or "@" with the channel ID for that channel. Also incorporates groups.

Usage

slackr_chtrans(channels, api_token = Sys.getenv("SLACK_API_TOKEN"))

slackrChtrans(channels, api_token = Sys.getenv("SLACK_API_TOKEN"))

slackrChTrans(channels, api_token = Sys.getenv("SLACK_API_TOKEN"))

Arguments

channels

vector of channel names to parse

api_token

the slack.com full API token (chr)

Value

character vector - original channel list with # or @ channels replaced with ID's.