Minor updates
This commit is contained in:
parent
3b3ba4f3cf
commit
cea362f506
|
@ -56,7 +56,7 @@ custom_error! {
|
|||
/// Supposed to be sent as numbers, though they are sent as string most of the time?
|
||||
///
|
||||
/// Also includes errors when initiating a connection and unexpected opcodes
|
||||
#[derive(PartialEq, Eq, Default)]
|
||||
#[derive(PartialEq, Eq, Default, Clone)]
|
||||
pub GatewayError
|
||||
// Errors we have received from the gateway
|
||||
#[default]
|
||||
|
|
|
@ -21,7 +21,7 @@ pub struct CallCreate {
|
|||
|
||||
impl WebSocketEvent for CallCreate {}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Default, Clone)]
|
||||
#[derive(Debug, Deserialize, Serialize, Default, Clone, PartialEq, Eq)]
|
||||
/// Officially Undocumented;
|
||||
/// Updates the client on which calls are ringing, along with a specific call?;
|
||||
///
|
||||
|
@ -38,7 +38,7 @@ pub struct CallUpdate {
|
|||
|
||||
impl WebSocketEvent for CallUpdate {}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Default, Clone)]
|
||||
#[derive(Debug, Deserialize, Serialize, Default, Clone, PartialEq, Eq)]
|
||||
/// Officially Undocumented;
|
||||
/// Deletes a ringing call;
|
||||
/// Ex: {"t":"CALL_DELETE","s":8,"op":0,"d":{"channel_id":"837609115475771392"}}
|
||||
|
@ -48,7 +48,7 @@ pub struct CallDelete {
|
|||
|
||||
impl WebSocketEvent for CallDelete {}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Default, Clone)]
|
||||
#[derive(Debug, Deserialize, Serialize, Default, Clone, PartialEq, Eq)]
|
||||
/// Officially Undocumented;
|
||||
/// See <https://unofficial-discord-docs.vercel.app/gateway/op13>;
|
||||
///
|
||||
|
|
|
@ -2,7 +2,7 @@ use crate::types::events::{PresenceUpdate, WebSocketEvent};
|
|||
use serde::{Deserialize, Serialize};
|
||||
use serde_with::serde_as;
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Clone)]
|
||||
#[derive(Debug, Deserialize, Serialize, Clone, PartialEq, Eq)]
|
||||
pub struct GatewayIdentifyPayload {
|
||||
pub token: String,
|
||||
pub properties: GatewayIdentifyConnectionProps,
|
||||
|
@ -68,7 +68,7 @@ impl GatewayIdentifyPayload {
|
|||
|
||||
impl WebSocketEvent for GatewayIdentifyPayload {}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Clone)]
|
||||
#[derive(Debug, Deserialize, Serialize, Clone, PartialEq, Eq)]
|
||||
#[serde_as]
|
||||
pub struct GatewayIdentifyConnectionProps {
|
||||
/// Almost always sent
|
||||
|
|
|
@ -2,7 +2,7 @@ use crate::types::{events::WebSocketEvent, UserStatus};
|
|||
use crate::types::{Activity, ClientStatusObject, PublicUser, Snowflake};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Default, Clone)]
|
||||
#[derive(Debug, Deserialize, Serialize, Default, Clone, PartialEq, Eq)]
|
||||
/// Sent by the client to update its status and presence;
|
||||
/// See <https://discord.com/developers/docs/topics/gateway-events#update-presence>
|
||||
pub struct UpdatePresence {
|
||||
|
@ -14,7 +14,7 @@ pub struct UpdatePresence {
|
|||
pub afk: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Default, Clone)]
|
||||
#[derive(Debug, Deserialize, Serialize, Default, Clone, PartialEq, Eq)]
|
||||
/// Received to tell the client that a user updated their presence / status
|
||||
/// See <https://discord.com/developers/docs/topics/gateway-events#presence-update-presence-update-event-fields>
|
||||
pub struct PresenceUpdate {
|
||||
|
|
|
@ -4,7 +4,7 @@ use crate::types::entities::PublicUser;
|
|||
use crate::types::events::WebSocketEvent;
|
||||
use crate::types::utils::Snowflake;
|
||||
|
||||
#[derive(Debug, Default, Deserialize, Serialize, Clone)]
|
||||
#[derive(Debug, Default, Deserialize, Serialize, Clone, PartialEq, Eq)]
|
||||
/// See <https://discord.com/developers/docs/topics/gateway-events#user-update>;
|
||||
/// Sent to indicate updates to a user object; (name changes, discriminator changes, etc);
|
||||
pub struct UserUpdate {
|
||||
|
@ -14,7 +14,7 @@ pub struct UserUpdate {
|
|||
|
||||
impl WebSocketEvent for UserUpdate {}
|
||||
|
||||
#[derive(Debug, Default, Deserialize, Serialize, Clone)]
|
||||
#[derive(Debug, Default, Deserialize, Serialize, Clone, PartialEq, Eq)]
|
||||
/// Undocumented;
|
||||
///
|
||||
/// Possibly an update for muted guild / channel settings for the current user;
|
||||
|
@ -39,7 +39,7 @@ pub struct UserGuildSettingsUpdate {
|
|||
|
||||
impl WebSocketEvent for UserGuildSettingsUpdate {}
|
||||
|
||||
#[derive(Debug, Default, Deserialize, Serialize, Clone)]
|
||||
#[derive(Debug, Default, Deserialize, Serialize, Clone, PartialEq, Eq)]
|
||||
/// Undocumented;
|
||||
///
|
||||
/// Received in [UserGuildSettingsUpdate];
|
||||
|
|
|
@ -3,7 +3,7 @@ use std::net::Ipv4Addr;
|
|||
use crate::types::WebSocketEvent;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Clone)]
|
||||
#[derive(Debug, Deserialize, Serialize, Clone, PartialEq, Eq)]
|
||||
/// The ready event for the webrtc stream;
|
||||
/// Used to give info after the identify event;
|
||||
/// See https://discord.com/developers/docs/topics/voice-connections#establishing-a-voice-websocket-connection-example-voice-ready-payload;
|
||||
|
|
|
@ -2,7 +2,7 @@ use serde::{Deserialize, Serialize};
|
|||
|
||||
use crate::types::{entities::Emoji, Snowflake};
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Clone)]
|
||||
#[derive(Debug, Deserialize, Serialize, Clone, PartialEq, Eq)]
|
||||
pub struct Activity {
|
||||
name: String,
|
||||
#[serde(rename = "type")]
|
||||
|
@ -22,19 +22,19 @@ pub struct Activity {
|
|||
buttons: Option<Vec<ActivityButton>>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Clone)]
|
||||
#[derive(Debug, Deserialize, Serialize, Clone, PartialEq, Eq)]
|
||||
struct ActivityTimestamps {
|
||||
start: Option<i64>,
|
||||
end: Option<i64>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Clone)]
|
||||
#[derive(Debug, Deserialize, Serialize, Clone, PartialEq, Eq)]
|
||||
struct ActivityParty {
|
||||
id: Option<String>,
|
||||
size: Option<Vec<(i32, i32)>>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Clone)]
|
||||
#[derive(Debug, Deserialize, Serialize, Clone, PartialEq, Eq)]
|
||||
struct ActivityAssets {
|
||||
large_image: Option<String>,
|
||||
large_text: Option<String>,
|
||||
|
@ -42,7 +42,7 @@ struct ActivityAssets {
|
|||
small_text: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Clone)]
|
||||
#[derive(Debug, Deserialize, Serialize, Clone, PartialEq, Eq)]
|
||||
struct ActivitySecrets {
|
||||
join: Option<String>,
|
||||
spectate: Option<String>,
|
||||
|
@ -50,7 +50,7 @@ struct ActivitySecrets {
|
|||
match_string: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Clone)]
|
||||
#[derive(Debug, Deserialize, Serialize, Clone, PartialEq, Eq)]
|
||||
struct ActivityButton {
|
||||
label: String,
|
||||
url: String,
|
||||
|
|
Loading…
Reference in New Issue