Documentation ¶
Overview ¶
Example is a small demonstration of slackio's capabilities.
It has two modes.
Without a channel ID, it will connect to Slack and print (to standard output) all messages from all channels that the user is currently a member of.
With a channel ID, it will connect to Slack and print (to standard output) all messages from a single channel. Additionally, lines read from standard input are sent back to the channel as messages.
Note that the channel ID is a 9-character identifier, and is not the same as the human-readable channel name in the Slack UI. When viewing Slack in a browser, the ID of the selected channel will appear at the end of the URL path.
Usage:
SLACK_TOKEN=xoxb-token go run example/main.go [channel]
The SLACK_TOKEN environment variable must be a valid Slack API token. Otherwise, example will panic.