You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The afk timeout can be set to `60`, `300`, `900`, `1800`, and `3600` in
order to provide a better UX a struct has been added (`AfkTimeout`).
Reference: #1904Closes: #1904
…1922)
The AFK timeout of a guild has been represented as an integer, despite
the fact that the AFK timeout of a guild can only be a select list of
integers rather than a freeform value. To achieve a nice UX while
maintaining the representation of an integer, a newtype over an integer
with associated constants for known valid values has been introduced.
Example:
```rust
use twilight_model::guild::AfkTimeout;
assert_eq!(300, AfkTimeout::FIVE_MINUETES.get());
assert_eq!(300, AfkTimeout::FIVE_MINUTES); // impl PartialEq<AfkTimeout> for u16
```
Reference: #1904Closes: #1904
Docs PR: discord/discord-api-docs#5336
The text was updated successfully, but these errors were encountered: