aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristopher F <[email protected]>2018-06-15 18:40:46 -0400
committerZeyla Hellyer <[email protected]>2018-06-17 15:59:58 -0700
commita9e8626c4cd642087f828c5b32481bee9e4d368b (patch)
treef8e9f051317c6fd428ec7b6977fe0767a12936d2 /src
parentAdd servermom methods to http module (diff)
downloadserenity-a9e8626c4cd642087f828c5b32481bee9e4d368b.tar.xz
serenity-a9e8626c4cd642087f828c5b32481bee9e4d368b.zip
feature: add guild_id to Message, per g250k changes
this allows stateless bots to drop the need for a channel->guild mapping (cherry picked from commit 74bb8fa5a3b4b5fd43559866b4627bf09484f6ae)
Diffstat (limited to 'src')
-rw-r--r--src/model/channel/message.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/model/channel/message.rs b/src/model/channel/message.rs
index f518987..65cecd6 100644
--- a/src/model/channel/message.rs
+++ b/src/model/channel/message.rs
@@ -30,6 +30,11 @@ pub struct Message {
///
/// [`Channel`]: enum.Channel.html
pub channel_id: ChannelId,
+ /// The Id of the [`Guild`] that the message was sent in. This value will
+ /// only be present if this message was received over the gateway.
+ ///
+ /// [`Guild`]: ../guild/struct.Guild.html
+ pub guild_id: Option<GuildId>,
/// The content of the message.
pub content: String,
/// The timestamp of the last time the message was updated, if it was.