feat(core): include user and member on Message events

This commit is contained in:
Paul Makles
2024-06-25 21:01:45 +01:00
parent ac20b6bc99
commit 1d5dae4751
11 changed files with 117 additions and 34 deletions

View File

@@ -31,6 +31,12 @@ auto_derived_partial!(
pub channel: String,
/// Id of the user or webhook that sent this message
pub author: String,
/// The user that sent this message
#[serde(skip_serializing_if = "Option::is_none")]
pub user: Option<User>,
/// The member that sent this message
#[serde(skip_serializing_if = "Option::is_none")]
pub member: Option<Member>,
/// The webhook that sent this message
#[serde(skip_serializing_if = "Option::is_none")]
pub webhook: Option<MessageWebhook>,