diff options
| author | Christopher F <[email protected]> | 2018-06-15 18:40:46 -0400 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2018-06-17 15:59:58 -0700 |
| commit | a9e8626c4cd642087f828c5b32481bee9e4d368b (patch) | |
| tree | f8e9f051317c6fd428ec7b6977fe0767a12936d2 /src | |
| parent | Add servermom methods to http module (diff) | |
| download | serenity-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.rs | 5 |
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. |