| 1 | package slackscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ |
| 2 | |
| 3 | // OutgoingMessage is used for the realtime API, and seems incomplete. |
| 4 | type OutgoingMessagescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/OutgoingMessage# struct { |
| 5 | IDscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/OutgoingMessage#ID. int `json:"id"` |
| 6 | // channel ID |
| 7 | Channelscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/OutgoingMessage#Channel. string `json:"channel,omitempty"` |
| 8 | Textscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/OutgoingMessage#Text. string `json:"text,omitempty"` |
| 9 | Typescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/OutgoingMessage#Type. string `json:"type,omitempty"` |
| 10 | ThreadTimestampscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/OutgoingMessage#ThreadTimestamp. string `json:"thread_ts,omitempty"` |
| 11 | ThreadBroadcastscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/OutgoingMessage#ThreadBroadcast. bool `json:"reply_broadcast,omitempty"` |
| 12 | IDsscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/OutgoingMessage#IDs. []string `json:"ids,omitempty"` |
| 13 | } |
| 14 | |
| 15 | // Message is an auxiliary type to allow us to have a message containing sub messages |
| 16 | type Messagescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Message# struct { |
| 17 | Msgscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Message#Msg. |
| 18 | SubMessagescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Message#SubMessage. *Msgscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg# `json:"message,omitempty"` |
| 19 | PreviousMessagescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Message#PreviousMessage. *Msgscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg# `json:"previous_message,omitempty"` |
| 20 | } |
| 21 | |
| 22 | // Msg SubTypes (https://api.slack.com/events/message) |
| 23 | const ( |
| 24 | MsgSubTypeBotMessagescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MsgSubTypeBotMessage. = "bot_message" // [Events API, RTM] A message was posted by an integration |
| 25 | MsgSubTypeMeMessagescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MsgSubTypeMeMessage. = "me_message" // [Events API, RTM] A /me message was sent |
| 26 | MsgSubTypeMessageChangedscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MsgSubTypeMessageChanged. = "message_changed" // [Events API, RTM] A message was changed |
| 27 | MsgSubTypeMessageDeletedscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MsgSubTypeMessageDeleted. = "message_deleted" // [Events API, RTM] A message was deleted |
| 28 | MsgSubTypeMessageRepliedscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MsgSubTypeMessageReplied. = "message_replied" // [Events API, RTM] A message thread received a reply |
| 29 | MsgSubTypeReplyBroadcastscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MsgSubTypeReplyBroadcast. = "reply_broadcast" // @Deprecated (No longer served) A message thread's reply was broadcast to a channel |
| 30 | MsgSubTypeThreadBroadcastscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MsgSubTypeThreadBroadcast. = "thread_broadcast" // [Events API, RTM] A message thread's reply was broadcast to a channel |
| 31 | MsgSubTypeChannelJoinscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MsgSubTypeChannelJoin. = "channel_join" // [Events API, RTM] A member joined a channel |
| 32 | MsgSubTypeChannelLeavescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MsgSubTypeChannelLeave. = "channel_leave" // [Events API, RTM] A member left a channel |
| 33 | MsgSubTypeChannelTopicscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MsgSubTypeChannelTopic. = "channel_topic" // [Events API, RTM] A channel topic was updated |
| 34 | MsgSubTypeChannelPurposescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MsgSubTypeChannelPurpose. = "channel_purpose" // [Events API, RTM] A channel purpose was updated |
| 35 | MsgSubTypeChannelNamescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MsgSubTypeChannelName. = "channel_name" // [Events API, RTM] A channel was renamed |
| 36 | MsgSubTypeChannelArchivescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MsgSubTypeChannelArchive. = "channel_archive" // [Events API, RTM] A channel was archived |
| 37 | MsgSubTypeChannelUnarchivescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MsgSubTypeChannelUnarchive. = "channel_unarchive" // [Events API, RTM] A channel was unarchived |
| 38 | MsgSubTypeGroupJoinscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MsgSubTypeGroupJoin. = "group_join" // [RTM] A member joined a group |
| 39 | MsgSubTypeGroupLeavescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MsgSubTypeGroupLeave. = "group_leave" // [RTM] A member left a group |
| 40 | MsgSubTypeGroupTopicscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MsgSubTypeGroupTopic. = "group_topic" // [RTM] A group topic was updated |
| 41 | MsgSubTypeGroupPurposescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MsgSubTypeGroupPurpose. = "group_purpose" // [RTM] A group purpose was updated |
| 42 | MsgSubTypeGroupNamescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MsgSubTypeGroupName. = "group_name" // [RTM] A group was renamed |
| 43 | MsgSubTypeGroupArchivescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MsgSubTypeGroupArchive. = "group_archive" // [RTM] A group was archived |
| 44 | MsgSubTypeGroupUnarchivescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MsgSubTypeGroupUnarchive. = "group_unarchive" // [RTM] A group was unarchived |
| 45 | MsgSubTypeFileSharescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MsgSubTypeFileShare. = "file_share" // [Events API, RTM] A file was shared into a channel |
| 46 | MsgSubTypeFileCommentscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MsgSubTypeFileComment. = "file_comment" // [RTM] A comment was added to a file |
| 47 | MsgSubTypeGileMentionscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MsgSubTypeGileMention. = "file_mention" // [RTM] A file was mentioned in a channel |
| 48 | MsgSubTypePinnedItemscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MsgSubTypePinnedItem. = "pinned_item" // [RTM] An item was pinned in a channel |
| 49 | MsgSubTypeUnpinnedItemscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MsgSubTypeUnpinnedItem. = "unpinned_item" // [RTM] An item was unpinned from a channel |
| 50 | MsgSubTypeEkmAccessDeniedscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MsgSubTypeEkmAccessDenied. = "ekm_access_denied" // [Events API, RTM] Message content redacted due to Enterprise Key Management (EKM) |
| 51 | MsgSubTypeChannelPostingPermissionsscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/MsgSubTypeChannelPostingPermissions. = "channel_posting_permissions" // [Events API, RTM] The posting permissions for a channel changed |
| 52 | ) |
| 53 | |
| 54 | // Msg contains information about a slack message |
| 55 | type Msgscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg# struct { |
| 56 | // Basic Message |
| 57 | ClientMsgIDscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#ClientMsgID. string `json:"client_msg_id,omitempty"` |
| 58 | Typescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#Type. string `json:"type,omitempty"` |
| 59 | Channelscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#Channel. string `json:"channel,omitempty"` |
| 60 | Userscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#User. string `json:"user,omitempty"` |
| 61 | Textscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#Text. string `json:"text,omitempty"` |
| 62 | Timestampscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#Timestamp. string `json:"ts,omitempty"` |
| 63 | ThreadTimestampscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#ThreadTimestamp. string `json:"thread_ts,omitempty"` |
| 64 | IsStarredscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#IsStarred. bool `json:"is_starred,omitempty"` |
| 65 | PinnedToscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#PinnedTo. []string `json:"pinned_to,omitempty"` |
| 66 | Attachmentsscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#Attachments. []Attachmentscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Attachment# `json:"attachments,omitempty"` |
| 67 | Editedscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#Edited. *Editedscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Edited# `json:"edited,omitempty"` |
| 68 | LastReadscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#LastRead. string `json:"last_read,omitempty"` |
| 69 | Subscribedscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#Subscribed. bool `json:"subscribed,omitempty"` |
| 70 | UnreadCountscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#UnreadCount. int `json:"unread_count,omitempty"` |
| 71 | |
| 72 | // Message Subtypes |
| 73 | SubTypescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#SubType. string `json:"subtype,omitempty"` |
| 74 | |
| 75 | // Hidden Subtypes |
| 76 | Hiddenscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#Hidden. bool `json:"hidden,omitempty"` // message_changed, message_deleted, unpinned_item |
| 77 | DeletedTimestampscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#DeletedTimestamp. string `json:"deleted_ts,omitempty"` // message_deleted |
| 78 | EventTimestampscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#EventTimestamp. string `json:"event_ts,omitempty"` |
| 79 | |
| 80 | // bot_message (https://api.slack.com/events/message/bot_message) |
| 81 | BotIDscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#BotID. string `json:"bot_id,omitempty"` |
| 82 | Usernamescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#Username. string `json:"username,omitempty"` |
| 83 | Iconsscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#Icons. *Iconscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Icon# `json:"icons,omitempty"` |
| 84 | BotProfilescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#BotProfile. *BotProfilescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/BotProfile# `json:"bot_profile,omitempty"` |
| 85 | |
| 86 | // channel_join, group_join |
| 87 | Inviterscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#Inviter. string `json:"inviter,omitempty"` |
| 88 | |
| 89 | // channel_topic, group_topic |
| 90 | Topicscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#Topic. string `json:"topic,omitempty"` |
| 91 | |
| 92 | // channel_purpose, group_purpose |
| 93 | Purposescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#Purpose. string `json:"purpose,omitempty"` |
| 94 | |
| 95 | // channel_name, group_name |
| 96 | Namescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#Name. string `json:"name,omitempty"` |
| 97 | OldNamescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#OldName. string `json:"old_name,omitempty"` |
| 98 | |
| 99 | // channel_archive, group_archive |
| 100 | Membersscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#Members. []string `json:"members,omitempty"` |
| 101 | |
| 102 | // channels.replies, groups.replies, im.replies, mpim.replies |
| 103 | ReplyCountscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#ReplyCount. int `json:"reply_count,omitempty"` |
| 104 | Repliesscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#Replies. []Replyscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Reply# `json:"replies,omitempty"` |
| 105 | ParentUserIdscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#ParentUserId. string `json:"parent_user_id,omitempty"` |
| 106 | LatestReplyscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#LatestReply. string `json:"latest_reply,omitempty"` |
| 107 | |
| 108 | // file_share, file_comment, file_mention |
| 109 | Filesscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#Files. []Filescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/File# `json:"files,omitempty"` |
| 110 | |
| 111 | // file_share |
| 112 | Uploadscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#Upload. bool `json:"upload,omitempty"` |
| 113 | |
| 114 | // file_comment |
| 115 | Commentscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#Comment. *Commentscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Comment# `json:"comment,omitempty"` |
| 116 | |
| 117 | // pinned_item |
| 118 | ItemTypescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#ItemType. string `json:"item_type,omitempty"` |
| 119 | |
| 120 | // https://api.slack.com/rtm |
| 121 | ReplyToscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#ReplyTo. int `json:"reply_to,omitempty"` |
| 122 | Teamscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#Team. string `json:"team,omitempty"` |
| 123 | |
| 124 | // reactions |
| 125 | Reactionsscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#Reactions. []ItemReactionscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ItemReaction# `json:"reactions,omitempty"` |
| 126 | |
| 127 | // slash commands and interactive messages |
| 128 | ResponseTypescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#ResponseType. string `json:"response_type,omitempty"` |
| 129 | ReplaceOriginalscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#ReplaceOriginal. bool `json:"replace_original"` |
| 130 | DeleteOriginalscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#DeleteOriginal. bool `json:"delete_original"` |
| 131 | |
| 132 | // metadata |
| 133 | Metadatascip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#Metadata. SlackMetadatascip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/SlackMetadata# `json:"metadata,omitempty"` |
| 134 | |
| 135 | // Block type Message |
| 136 | Blocksscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#Blocks. Blocksscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Blocks# `json:"blocks,omitempty"` |
| 137 | // permalink |
| 138 | Permalinkscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Msg#Permalink. string `json:"permalink,omitempty"` |
| 139 | } |
| 140 | |
| 141 | const ( |
| 142 | // ResponseTypeInChannel in channel response for slash commands. |
| 143 | ResponseTypeInChannelscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ResponseTypeInChannel. = "in_channel" |
| 144 | // ResponseTypeEphemeral ephemeral response for slash commands. |
| 145 | ResponseTypeEphemeralscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ResponseTypeEphemeral. = "ephemeral" |
| 146 | ) |
| 147 | |
| 148 | // ScheduledMessage contains information about a slack scheduled message |
| 149 | type ScheduledMessagescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ScheduledMessage# struct { |
| 150 | IDscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ScheduledMessage#ID. string `json:"id"` |
| 151 | Channelscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ScheduledMessage#Channel. string `json:"channel_id"` |
| 152 | PostAtscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ScheduledMessage#PostAt. int `json:"post_at"` |
| 153 | DateCreatedscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ScheduledMessage#DateCreated. int `json:"date_created"` |
| 154 | Textscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ScheduledMessage#Text. string `json:"text"` |
| 155 | } |
| 156 | |
| 157 | // Icon is used for bot messages |
| 158 | type Iconscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Icon# struct { |
| 159 | IconURLscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Icon#IconURL. string `json:"icon_url,omitempty"` |
| 160 | IconEmojiscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Icon#IconEmoji. string `json:"icon_emoji,omitempty"` |
| 161 | } |
| 162 | |
| 163 | // BotProfile contains information about a bot |
| 164 | type BotProfilescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/BotProfile# struct { |
| 165 | AppIDscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/BotProfile#AppID. string `json:"app_id,omitempty"` |
| 166 | Deletedscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/BotProfile#Deleted. bool `json:"deleted,omitempty"` |
| 167 | Iconsscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/BotProfile#Icons. *Iconsscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Icons# `json:"icons,omitempty"` |
| 168 | IDscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/BotProfile#ID. string `json:"id,omitempty"` |
| 169 | Namescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/BotProfile#Name. string `json:"name,omitempty"` |
| 170 | TeamIDscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/BotProfile#TeamID. string `json:"team_id,omitempty"` |
| 171 | Updatedscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/BotProfile#Updated. int64 `json:"updated,omitempty"` |
| 172 | } |
| 173 | |
| 174 | // Edited indicates that a message has been edited. |
| 175 | type Editedscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Edited# struct { |
| 176 | Userscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Edited#User. string `json:"user,omitempty"` |
| 177 | Timestampscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Edited#Timestamp. string `json:"ts,omitempty"` |
| 178 | } |
| 179 | |
| 180 | // Reply contains information about a reply for a thread |
| 181 | type Replyscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Reply# struct { |
| 182 | Userscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Reply#User. string `json:"user,omitempty"` |
| 183 | Timestampscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Reply#Timestamp. string `json:"ts,omitempty"` |
| 184 | } |
| 185 | |
| 186 | // Event contains the event type |
| 187 | type Eventscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Event# struct { |
| 188 | Typescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Event#Type. string `json:"type,omitempty"` |
| 189 | } |
| 190 | |
| 191 | // Ping contains information about a Ping Event |
| 192 | type Pingscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Ping# struct { |
| 193 | IDscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Ping#ID. int `json:"id"` |
| 194 | Typescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Ping#Type. string `json:"type"` |
| 195 | Timestampscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Ping#Timestamp. int64 `json:"timestamp"` |
| 196 | } |
| 197 | |
| 198 | // Pong contains information about a Pong Event |
| 199 | type Pongscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Pong# struct { |
| 200 | Typescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Pong#Type. string `json:"type"` |
| 201 | ReplyToscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Pong#ReplyTo. int `json:"reply_to"` |
| 202 | Timestampscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/Pong#Timestamp. int64 `json:"timestamp"` |
| 203 | } |
| 204 | |
| 205 | // NewOutgoingMessage prepares an OutgoingMessage that the user can |
| 206 | // use to send a message. Use this function to properly set the |
| 207 | // messageID. |
| 208 | func (rtm *RTMscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/RTM#) NewOutgoingMessagescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/RTM#NewOutgoingMessage().(text string, channelID string, options ...RTMsgOptionscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/RTMsgOption#) *OutgoingMessagescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/OutgoingMessage# { |
| 209 | id := rtm.idGenscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/RTM#idGen..Nextscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/IDGenerator#Next.() |
| 210 | msg := OutgoingMessagescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/OutgoingMessage#{ |
| 211 | IDscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/OutgoingMessage#ID.: id, |
| 212 | Typescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/OutgoingMessage#Type.: "message", |
| 213 | Channelscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/OutgoingMessage#Channel.: channelID, |
| 214 | Textscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/OutgoingMessage#Text.: text, |
| 215 | } |
| 216 | for _, option := range options { |
| 217 | option(&msg) |
| 218 | } |
| 219 | return &msg |
| 220 | } |
| 221 | |
| 222 | // NewSubscribeUserPresence prepares an OutgoingMessage that the user can |
| 223 | // use to subscribe presence events for the specified users. |
| 224 | func (rtm *RTMscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/RTM#) NewSubscribeUserPresencescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/RTM#NewSubscribeUserPresence().(ids []string) *OutgoingMessagescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/OutgoingMessage# { |
| 225 | return &OutgoingMessagescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/OutgoingMessage#{ |
| 226 | Typescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/OutgoingMessage#Type.: "presence_sub", |
| 227 | IDsscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/OutgoingMessage#IDs.: ids, |
| 228 | } |
| 229 | } |
| 230 | |
| 231 | // NewTypingMessage prepares an OutgoingMessage that the user can |
| 232 | // use to send as a typing indicator. Use this function to properly set the |
| 233 | // messageID. |
| 234 | func (rtm *RTMscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/RTM#) NewTypingMessagescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/RTM#NewTypingMessage().(channelID string) *OutgoingMessagescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/OutgoingMessage# { |
| 235 | id := rtm.idGenscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/RTM#idGen..Nextscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/IDGenerator#Next.() |
| 236 | return &OutgoingMessagescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/OutgoingMessage#{ |
| 237 | IDscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/OutgoingMessage#ID.: id, |
| 238 | Typescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/OutgoingMessage#Type.: "typing", |
| 239 | Channelscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/OutgoingMessage#Channel.: channelID, |
| 240 | } |
| 241 | } |
| 242 | |
| 243 | // RTMsgOption allows configuration of various options available for sending an RTM message |
| 244 | type RTMsgOptionscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/RTMsgOption# func(*OutgoingMessagescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/OutgoingMessage#) |
| 245 | |
| 246 | // RTMsgOptionTS sets thead timestamp of an outgoing message in order to respond to a thread |
| 247 | func RTMsgOptionTSscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/RTMsgOptionTS().(threadTimestamp string) RTMsgOptionscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/RTMsgOption# { |
| 248 | return func(msg *OutgoingMessagescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/OutgoingMessage#) { |
| 249 | msg.ThreadTimestampscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/OutgoingMessage#ThreadTimestamp. = threadTimestamp |
| 250 | } |
| 251 | } |
| 252 | |
| 253 | // RTMsgOptionBroadcast sets broadcast reply to channel to "true" |
| 254 | func RTMsgOptionBroadcastscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/RTMsgOptionBroadcast().() RTMsgOptionscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/RTMsgOption# { |
| 255 | return func(msg *OutgoingMessagescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/OutgoingMessage#) { |
| 256 | msg.ThreadBroadcastscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/OutgoingMessage#ThreadBroadcast. = true |
| 257 | } |
| 258 | } |