Learn R Programming

slackr (version 2.0.1)

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.

Usage

slackr_chtrans(
  channels,
  bot_user_oauth_token = Sys.getenv("SLACK_BOT_USER_OAUTH_TOKEN")
)

slackrChtrans( channels, bot_user_oauth_token = Sys.getenv("SLACK_BOT_USER_OAUTH_TOKEN") )

slackrChTrans( channels, bot_user_oauth_token = Sys.getenv("SLACK_BOT_USER_OAUTH_TOKEN") )

Arguments

channels

vector of channel names to parse

bot_user_oauth_token

the Slack bot user OAuth token (chr)

Value

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