Refactor project to use chorus::Gateway[...]
This commit is contained in:
parent
497c3bda74
commit
b738f4d543
|
@ -4,6 +4,7 @@ use chorus::{
|
|||
self,
|
||||
gateway::Observer,
|
||||
types::{GatewayIdentifyPayload, GatewayReady},
|
||||
Gateway,
|
||||
};
|
||||
use std::{sync::Arc, time::Duration};
|
||||
use tokio::{self, time::sleep};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::time::Duration;
|
||||
|
||||
use chorus::gateway::{GatewayCapable, GatewayHandleCapable};
|
||||
use chorus::{self, types::GatewayIdentifyPayload};
|
||||
use chorus::{self, types::GatewayIdentifyPayload, Gateway};
|
||||
use tokio::time::sleep;
|
||||
|
||||
/// This example creates a simple gateway connection and a session with an Identify event
|
||||
|
|
|
@ -8,6 +8,7 @@ use crate::gateway::{GatewayCapable, GatewayHandleCapable};
|
|||
use crate::instance::{ChorusUser, Instance};
|
||||
use crate::ratelimiter::ChorusRequest;
|
||||
use crate::types::{GatewayIdentifyPayload, LimitType, LoginResult, LoginSchema};
|
||||
use crate::Gateway;
|
||||
|
||||
impl Instance {
|
||||
/// Logs into an existing account on the spacebar server.
|
||||
|
|
|
@ -12,6 +12,7 @@ use crate::{
|
|||
types::LimitType,
|
||||
types::RegisterSchema,
|
||||
};
|
||||
use crate::{Gateway, GatewayHandle};
|
||||
|
||||
impl Instance {
|
||||
/// Registers a new user on the server.
|
||||
|
|
|
@ -12,7 +12,7 @@ use crate::types::{
|
|||
};
|
||||
|
||||
#[cfg(feature = "client")]
|
||||
use crate::types::Composite;
|
||||
use crate::{types::Composite, GatewayHandle};
|
||||
|
||||
#[cfg(feature = "client")]
|
||||
use crate::gateway::Updateable;
|
||||
|
|
|
@ -7,7 +7,7 @@ use crate::types::entities::User;
|
|||
use crate::types::Snowflake;
|
||||
|
||||
#[cfg(feature = "client")]
|
||||
use crate::types::Composite;
|
||||
use crate::{types::Composite, GatewayHandle};
|
||||
|
||||
#[cfg(feature = "client")]
|
||||
use crate::gateway::Updateable;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
use std::fmt::Debug;
|
||||
use std::sync::{Arc, RwLock};
|
||||
|
||||
use bitflags::bitflags;
|
||||
use chrono::{DateTime, Utc};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_repr::{Deserialize_repr, Serialize_repr};
|
||||
|
@ -11,12 +12,11 @@ use crate::types::{
|
|||
interfaces::WelcomeScreenObject,
|
||||
utils::Snowflake,
|
||||
};
|
||||
use bitflags::bitflags;
|
||||
|
||||
use super::PublicUser;
|
||||
|
||||
#[cfg(feature = "client")]
|
||||
use crate::gateway::Updateable;
|
||||
use crate::{gateway::Updateable, GatewayHandle};
|
||||
|
||||
#[cfg(feature = "client")]
|
||||
use chorus_macros::{observe_option_vec, observe_vec, Composite, Updateable};
|
||||
|
|
|
@ -24,7 +24,7 @@ pub use voice_state::*;
|
|||
pub use webhook::*;
|
||||
|
||||
#[cfg(feature = "client")]
|
||||
use crate::gateway::Updateable;
|
||||
use crate::{gateway::Updateable, GatewayHandle};
|
||||
|
||||
#[cfg(feature = "client")]
|
||||
use async_trait::async_trait;
|
||||
|
|
|
@ -12,7 +12,7 @@ use chorus_macros::{Composite, Updateable};
|
|||
use crate::gateway::Updateable;
|
||||
|
||||
#[cfg(feature = "client")]
|
||||
use crate::types::Composite;
|
||||
use crate::{types::Composite, GatewayHandle};
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Default, Clone, PartialEq)]
|
||||
#[cfg_attr(feature = "client", derive(Updateable, Composite))]
|
||||
|
|
|
@ -8,7 +8,7 @@ use std::fmt::Debug;
|
|||
use crate::gateway::Updateable;
|
||||
|
||||
#[cfg(feature = "client")]
|
||||
use crate::types::Composite;
|
||||
use crate::{types::Composite, GatewayHandle};
|
||||
|
||||
#[cfg(feature = "client")]
|
||||
use chorus_macros::{Composite, Updateable};
|
||||
|
|
|
@ -4,7 +4,7 @@ use std::sync::{Arc, RwLock};
|
|||
use chorus_macros::Composite;
|
||||
|
||||
#[cfg(feature = "client")]
|
||||
use crate::types::Composite;
|
||||
use crate::{types::Composite, GatewayHandle};
|
||||
|
||||
#[cfg(feature = "client")]
|
||||
use crate::gateway::Updateable;
|
||||
|
|
|
@ -10,7 +10,7 @@ use crate::gateway::Updateable;
|
|||
use chorus_macros::{Composite, Updateable};
|
||||
|
||||
#[cfg(feature = "client")]
|
||||
use crate::types::Composite;
|
||||
use crate::{types::Composite, GatewayHandle};
|
||||
|
||||
use crate::types::{
|
||||
entities::{Guild, User},
|
||||
|
|
Loading…
Reference in New Issue