diff options
| -rw-r--r-- | src/model/gateway.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/model/gateway.rs b/src/model/gateway.rs index 28e3d68..ca9b92f 100644 --- a/src/model/gateway.rs +++ b/src/model/gateway.rs @@ -16,6 +16,9 @@ use super::prelude::*; /// This is only applicable to bot users. #[derive(Clone, Debug, Deserialize, Serialize)] pub struct BotGateway { + /// Information describing how many gateway sessions you can initiate within + /// a ratelimit period. + pub session_start_limit: SessionStartLimit, /// The number of shards that is recommended to be used by the current bot /// user. pub shards: u64, @@ -376,3 +379,16 @@ pub struct Ready { #[serde(rename = "v")] pub version: u64, } + +/// Information describing how many gateway sessions you can initiate within a +/// ratelimit period. +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct SessionStartLimit { + /// The number of sessions that you can still initiate within the current + /// ratelimit period. + pub remaining: u64, + /// The number of milliseconds until the ratelimit period resets. + pub reset_after: u64, + /// The total number of session starts within the ratelimit period allowed. + pub total: u64, +}
\ No newline at end of file |