Implement UpdateMessage for GuildDelete
This commit is contained in:
parent
43f1aa1add
commit
b3bbff5c36
|
@ -80,12 +80,23 @@ impl UpdateMessage<Guild> for GuildUpdate {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Default, Deserialize, Serialize, Clone)]
|
#[derive(Debug, Default, Deserialize, Serialize, Clone, SourceUrlField, JsonField)]
|
||||||
/// See <https://discord.com/developers/docs/topics/gateway-events#guild-delete>;
|
/// See <https://discord.com/developers/docs/topics/gateway-events#guild-delete>;
|
||||||
/// Received to tell the client about a guild being deleted;
|
/// Received to tell the client about a guild being deleted;
|
||||||
pub struct GuildDelete {
|
pub struct GuildDelete {
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
pub guild: UnavailableGuild,
|
pub guild: UnavailableGuild,
|
||||||
|
#[serde(skip)]
|
||||||
|
pub source_url: String,
|
||||||
|
#[serde(skip)]
|
||||||
|
pub json: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl UpdateMessage<Guild> for GuildDelete {
|
||||||
|
fn id(&self) -> Option<Snowflake> {
|
||||||
|
Some(self.guild.id)
|
||||||
|
}
|
||||||
|
fn update(&mut self, _: Arc<RwLock<Guild>>) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl WebSocketEvent for GuildDelete {}
|
impl WebSocketEvent for GuildDelete {}
|
||||||
|
|
Loading…
Reference in New Issue