Struct slack::Sender[][src]

pub struct Sender { /* fields omitted */ }

Thread-safe API for sending messages asynchronously

Methods

impl Sender
[src]

Get the next message id

A value returned from this method must be included in the JSON payload (the id field) when constructing your own message.

Send a raw message

Must set message.id using result of get_msg_id().

Success from this API does not guarantee the message is delivered successfully since that runs on a separate task.

Send a message to the specified channel id

Success from this API does not guarantee the message is delivered successfully since that runs on a separate task.

channel_id is the slack channel id, e.g. UXYZ1234, not #general.

Only valid after RtmClient::run.

Marks connected client as being typing to a channel This is mostly used to signal to other peers that a message is being typed. Will have the server send a "user_typing" message to all the peers. Slack doc can be found at https://api.slack.com/rtm under "Typing Indicators"

channel_id is the slack channel id, e.g. UXYZ1234, not #general.

Subscribes to presence updates for the given users This is due to the update in presence events detailed here: https://api.slack.com/changelog/2017-10-making-rtm-presence-subscription-only

user_list is a slice of the list of users to subscrib, e.g. W839208, not @xyz. The full list of users to subscribe to must be sent each time the subscription should change Slack doc can be found at https://api.slack.com/docs/presence-and-status under "Determining user presence"

Shutdown RtmClient

Trait Implementations

impl Clone for Sender
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Sender

impl !Sync for Sender