Skip to content

Struct prelude::Message

zaun_bot::prelude::Message · Struct

pub struct Message { … }

Empty when the bot lacks message_content (unless it is mentioned).

Raw flag bits.

pub fn reply<impl Into<Reply>>(&self, reply: impl Into<Reply>) -> Result<Id, HostError>

Replies in the same channel. Returns the reply’s id.

The host’s refusal.

pub fn edit<impl Into<Reply>>(&self, reply: impl Into<Reply>) -> Result<(), HostError>

Edits it (the bot’s own messages only).

The host’s refusal.

pub fn delete(&self) -> Result<(), HostError>

Deletes it (the bot’s own, or any with MANAGE_MESSAGES).

The host’s refusal.

pub fn react(&self, emoji: &str) -> Result<(), HostError>

Adds a reaction.

The host’s refusal.

pub fn unreact(&self, emoji: &str) -> Result<(), HostError>

Removes the bot’s own reaction.

The host’s refusal.

Clone, Debug

Full rustdoc page