diff --git a/src/gateway/handle.rs b/src/gateway/handle.rs index 6bcdba8..98a7731 100644 --- a/src/gateway/handle.rs +++ b/src/gateway/handle.rs @@ -10,9 +10,10 @@ use std::fmt::Debug; use super::{events::Events, *}; use crate::types::{self, Composite, Shared}; -/// Represents a handle to a Gateway connection. A Gateway connection will create observable -/// [`GatewayEvents`](GatewayEvent), which you can subscribe to. Gateway events include all currently -/// implemented types with the trait [`WebSocketEvent`] +/// Represents a handle to a Gateway connection. +/// +/// A Gateway connection will create observable [`Events`], which you can subscribe to. +/// /// Using this handle you can also send Gateway Events directly. #[derive(Debug, Clone)] pub struct GatewayHandle { diff --git a/src/types/entities/mod.rs b/src/types/entities/mod.rs index 2fec4ca..545614c 100644 --- a/src/types/entities/mod.rs +++ b/src/types/entities/mod.rs @@ -128,10 +128,10 @@ pub trait Composite { pub trait IntoShared { /// Uses [`Shared`] to provide an ergonomic alternative to `Arc::new(RwLock::new(obj))`. /// - /// [`Shared`] can then be observed using the [`Gateway`], turning the underlying + /// [`Shared`] can then be observed using the gateway, turning the underlying /// `dyn Composite` into a self-updating struct, which is a tracked variant of a chorus /// entity struct, updating its' held information when new information concerning itself arrives - /// over the [`Gateway`] connection, reducing the need for expensive network-API calls. + /// over the gateway connection, reducing the need for expensive network-API calls. fn into_shared(self) -> Shared; } diff --git a/src/types/schema/user.rs b/src/types/schema/user.rs index e2600a4..9e25093 100644 --- a/src/types/schema/user.rs +++ b/src/types/schema/user.rs @@ -31,7 +31,7 @@ pub struct UserModifySchema { // TODO: Add a CDN data type pub avatar: Option, /// Note: This is not yet implemented on Spacebar - pub avatar_decoration_id: Option, + pub avatar_decoration_id: Option, /// Note: This is not yet implemented on Spacebar pub avatar_decoration_sku_id: Option, /// The user's email address; if changing from a verified email, email_token must be provided @@ -70,6 +70,11 @@ pub struct UserModifySchema { /// # Note /// /// This is not yet implemented on Spacebar + /// + /// [UserFlags]: crate::types::UserFlags + /// [UserFlags::PREMIUM_PROMO_DISMISSED]: crate::types::UserFlags::PREMIUM_PROMO_DISMISSED + /// [UserFlags::HAS_UNREAD_URGENT_MESSAGES]: + /// crate::types::UserFlags::HAS_UNREAD_URGENT_MESSAGES pub flags: Option, /// The user's date of birth, can only be set once /// diff --git a/src/types/utils/snowflake.rs b/src/types/utils/snowflake.rs index 27e44dc..e19f766 100644 --- a/src/types/utils/snowflake.rs +++ b/src/types/utils/snowflake.rs @@ -26,7 +26,7 @@ impl Snowflake { const PROCESS_ID: u64 = 1; static INCREMENT: AtomicUsize = AtomicUsize::new(0); - let time = (Utc::now().naive_utc().timestamp_millis() - EPOCH) << 22; + let time = (Utc::now().naive_utc().and_utc().timestamp_millis() - EPOCH) << 22; let worker = WORKER_ID << 17; let process = PROCESS_ID << 12; let increment = INCREMENT.fetch_add(1, Ordering::Relaxed) as u64 % 32;