Struct slackbot::Sender [] [src]

pub struct Sender<'a> {
    pub user: User,
    // some fields omitted
}

The sender of a command to the bot.

Fields

user

The user that sent the command.

Methods

impl<'a> Sender<'a>

fn new<S: Into<String>>(client: &'a mut RtmClient, channel_id: S, user: User) -> Self

fn respond_in_channel<S: Into<String>>(&mut self, message: S) -> Result<(), String>

Send a message to the channel that the message came from.

Examples

sender.respond_in_channel("Hello, world!");