Trait ReplyToMessage

Source
pub trait ReplyToMessage {
    // Required methods
    fn channel_login(&self) -> &str;
    fn message_id(&self) -> &str;
}
Expand description

Extract the message_id from a PrivmsgMessage or directly use an arbitrary String or &str as a message ID. This trait allows you to plug both of these types directly into say_in_reply_to() for your convenience.

For tuples (&str, &str) or (String, String), the first member is the login name of the channel the message was sent to, and the second member is the ID of the message to be deleted.

Note that even though UserNoticeMessage has a message_id, you can NOT reply to these messages or delete them. For this reason, ReplyToMessage is not implemented for UserNoticeMessage.

Required Methods§

Source

fn channel_login(&self) -> &str

Login name of the channel that the message was sent to.

Source

fn message_id(&self) -> &str

The unique string identifying the message, specified on the message via the id tag.

Implementations on Foreign Types§

Source§

impl<C, M> ReplyToMessage for (C, M)
where C: AsRef<str>, M: AsRef<str>,

Source§

fn channel_login(&self) -> &str

Source§

fn message_id(&self) -> &str

Implementors§