polyphony_types/events/
channel.rs1use chrono::{DateTime, Utc};
2use serde::{Deserialize, Serialize};
3use crate::entities::Channel;
4use crate::events::WebSocketEvent;
5
6#[derive(Debug, Default, Deserialize, Serialize)]
7pub struct ChannelPinsUpdate {
9 pub guild_id: Option<String>,
10 pub channel_id: String,
11 pub last_pin_timestamp: Option<DateTime<Utc>>,
12}
13
14impl WebSocketEvent for ChannelPinsUpdate {}
15
16#[derive(Debug, Default, Deserialize, Serialize)]
17pub struct ChannelCreate {
20 pub channel: Channel,
21}
22
23impl WebSocketEvent for ChannelCreate {}
24
25#[derive(Debug, Default, Deserialize, Serialize)]
26pub struct ChannelUpdate {
29 pub channel: Channel,
30}
31
32impl WebSocketEvent for ChannelUpdate {}
33
34#[derive(Debug, Default, Deserialize, Serialize)]
35pub struct ChannelDelete {
38 pub channel: Channel,
39}
40
41impl WebSocketEvent for ChannelDelete {}