Slack v0.23.5 Slack.Lookups View Source

Utility functions for looking up slack state information

Link to this section Summary

Functions

Turns a string like "#CHANNEL_NAME" into the ID that Slack understands ("C…") if a public channel, ("G…") if a group/private channel

Turns a Slack private channel ID ("G…") into a string in the format "#CHANNEL_NAME"

Turns a string like "@USER_NAME" or a user ID ("U…") into the ID for the direct message channel of that user ("D…"). nil is returned if a direct message channel has not yet been opened

Turns a string like "@USER_NAME" into the ID that Slack understands ("U…")

Turns a Slack user ID ("U…"), direct message ID ("D…"), or bot ID ("B…") into a string in the format "@USER_NAME"

Link to this section Functions

Link to this function

lookup_channel_id(arg, slack) View Source

Turns a string like "#CHANNEL_NAME" into the ID that Slack understands ("C…") if a public channel, ("G…") if a group/private channel.

Link to this function

lookup_channel_name(channel_id, slack) View Source

Turns a Slack private channel ID ("G…") into a string in the format "#CHANNEL_NAME".

Link to this function

lookup_direct_message_id(user, slack) View Source

Turns a string like "@USER_NAME" or a user ID ("U…") into the ID for the direct message channel of that user ("D…"). nil is returned if a direct message channel has not yet been opened.

NOTE: Referencing "@USER_NAME" is deprecated, and should not be used. For more information see https://api.slack.com/changelog/2017-09-the-one-about-usernames

Link to this function

lookup_user_id(arg, slack) View Source

Turns a string like "@USER_NAME" into the ID that Slack understands ("U…").

NOTE: Referencing "@USER_NAME" is deprecated, and should not be used. For more information see https://api.slack.com/changelog/2017-09-the-one-about-usernames

Link to this function

lookup_user_name(direct_message_id, slack) View Source

Turns a Slack user ID ("U…"), direct message ID ("D…"), or bot ID ("B…") into a string in the format "@USER_NAME".

NOTE: Referencing "@USER_NAME" is deprecated, and should not be used. For more information see https://api.slack.com/changelog/2017-09-the-one-about-usernames