Enum slack::Message
[−]
pub enum Message { Standard { ts: String, channel: Option<String>, user: Option<String>, text: Option<String>, is_starred: Option<bool>, pinned_to: Option<Vec<String>>, reactions: Option<Vec<Reaction>>, edited: Option<EditedMessageData>, attachments: Option<Vec<Attachment>>, }, BotMessage { ts: String, text: Option<String>, attachments: Option<Vec<Attachment>>, bot_id: String, username: Option<String>, icons: Option<HashMap<String, String, RandomState>>, }, MeMessage { channel: String, user: String, text: String, ts: String, }, MessageChanged { hidden: bool, channel: String, ts: String, message: Box<Message>, }, MessageDeleted { hidden: bool, channel: String, ts: String, deleted_ts: String, }, ChannelJoin { ts: String, user: String, text: String, inviter: Option<String>, }, ChannelLeave { ts: String, user: String, text: String, }, ChannelTopic { ts: String, user: String, topic: String, text: String, }, ChannelPurpose { ts: String, user: String, purpose: String, text: String, }, ChannelName { ts: String, user: String, old_name: String, name: String, text: String, }, ChannelArchive { ts: String, text: String, user: String, members: Vec<String>, }, ChannelUnarchive { ts: String, text: String, user: String, }, GroupJoin { ts: String, user: String, text: String, inviter: Option<String>, }, GroupLeave { ts: String, user: String, text: String, }, GroupTopic { ts: String, user: String, topic: String, text: String, }, GroupPurpose { ts: String, user: String, purpose: String, text: String, }, GroupName { ts: String, user: String, old_name: String, name: String, text: String, }, GroupArchive { ts: String, text: String, user: String, members: Vec<String>, }, GroupUnarchive { ts: String, text: String, user: String, }, FileShare { ts: String, text: String, file: File, user: String, upload: bool, }, FileComment { ts: String, text: String, file: File, comment: Comment, }, FileMention { ts: String, text: String, file: File, user: String, }, PinnedItem { user: String, item_type: String, text: String, item: Option<Item>, channel: String, ts: String, attachments: Option<Vec<Attachment>>, }, UnpinnedItem { user: String, item_type: String, text: String, item: Option<Item>, channel: String, ts: String, attachments: Option<Vec<Attachment>>, }, }
Represents Slack message event types.
Variants
Standard
The Slack Message
event that represents a message
to a channel, group or im.
Fields
ts: String | |
channel: Option<String> | |
user: Option<String> | |
text: Option<String> | |
is_starred: Option<bool> | |
pinned_to: Option<Vec<String>> | |
reactions: Option<Vec<Reaction>> | |
edited: Option<EditedMessageData> | |
attachments: Option<Vec<Attachment>> |
BotMessage
Wraps the bot_message
message event.
Fields
ts: String | |
text: Option<String> | |
attachments: Option<Vec<Attachment>> | |
bot_id: String | |
username: Option<String> | |
icons: Option<HashMap<String, String, RandomState>> |
MeMessage
Wraps the me_message
message event.
Fields
channel: String | |
user: String | |
text: String | |
ts: String |
MessageChanged
Wraps the message_changed
message
event.
Fields
channel: String | |
ts: String | |
message: Box<Message> |
MessageDeleted
Wraps the message_deleted
message
event.
Fields
channel: String | |
ts: String | |
deleted_ts: String |
ChannelJoin
Wraps the channel_join
message
event.
Fields
ts: String | |
user: String | |
text: String | |
inviter: Option<String> |
ChannelLeave
Wraps the channel_leave
message
event.
Fields
ts: String | |
user: String | |
text: String |
ChannelTopic
Wraps the channel_topic
message
event.
Fields
ts: String | |
user: String | |
topic: String | |
text: String |
ChannelPurpose
Wraps the channel_purpose
message
event.
Fields
ts: String | |
user: String | |
purpose: String | |
text: String |
ChannelName
Wraps the channel_name
message
event.
Fields
ts: String | |
user: String | |
old_name: String | |
name: String | |
text: String |
ChannelArchive
Wraps the channel_archive
message
event.
Fields
ts: String | |
text: String | |
user: String | |
members: Vec<String> |
ChannelUnarchive
Wraps the channel_unarchive
message event.
Fields
ts: String | |
text: String | |
user: String |
GroupJoin
Wraps the group_join
message event.
Fields
ts: String | |
user: String | |
text: String | |
inviter: Option<String> |
GroupLeave
Wraps the group_leave
message event.
Fields
ts: String | |
user: String | |
text: String |
GroupTopic
Wraps the group_topic
message event.
Fields
ts: String | |
user: String | |
topic: String | |
text: String |
GroupPurpose
Wraps the group_purpose
message
event.
Fields
ts: String | |
user: String | |
purpose: String | |
text: String |
GroupName
Wraps the group_name
message event.
Fields
ts: String | |
user: String | |
old_name: String | |
name: String | |
text: String |
GroupArchive
Wraps the group_archive
message
event.
Fields
ts: String | |
text: String | |
user: String | |
members: Vec<String> |
GroupUnarchive
Wraps the group_unarchive
message event.
Fields
ts: String | |
text: String | |
user: String |
Wraps the file_share
message event.
Fields
ts: String | |
text: String | |
file: File | |
user: String | |
upload: bool |
FileComment
Wraps the file_comment
message
event.
Fields
ts: String | |
text: String | |
file: File | |
comment: Comment |
FileMention
Wraps the file_mention
message
event.
Fields
ts: String | |
text: String | |
file: File | |
user: String |
PinnedItem
Wraps the pinned_item
message event.
Fields
user: String | |
item_type: String | |
text: String | |
item: Option<Item> | |
channel: String | |
ts: String | |
attachments: Option<Vec<Attachment>> |
UnpinnedItem
Wraps the unpinned_item
message
event.
Fields
user: String | |
item_type: String | |
text: String | |
item: Option<Item> | |
channel: String | |
ts: String | |
attachments: Option<Vec<Attachment>> |
Trait Implementations
impl Debug for Message
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter.
impl Clone for Message
fn clone(&self) -> Message
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more