pub struct Ready {
pub v: Option<u64>,
pub session_id: String,
pub resume_gateway_url: Option<String>,
pub user: User,
pub guilds: Option<Vec<UnavailableGuild>>,
pub shard: Option<[u64; 2]>,
}Expand description
Received once after connecting. Contains the bot user, session info for resuming, and the initial guild list.
Fields§
§v: Option<u64>§session_id: String§resume_gateway_url: Option<String>§user: User§guilds: Option<Vec<UnavailableGuild>>Guilds come in as unavailable first; full data arrives via GUILD_CREATE events.
shard: Option<[u64; 2]>[shard_id, num_shards]
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Ready
impl<'de> Deserialize<'de> for Ready
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Ready
impl RefUnwindSafe for Ready
impl Send for Ready
impl Sync for Ready
impl Unpin for Ready
impl UnsafeUnpin for Ready
impl UnwindSafe for Ready
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more