Skip to content

Commit 9549110

Browse files
authored
Add caching guarantees to Guild::threads (#3038)
1 parent ad58c3f commit 9549110

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/model/guild/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,10 @@ pub struct Guild {
273273
#[serde(deserialize_with = "deserialize_guild_channels")]
274274
pub channels: HashMap<ChannelId, GuildChannel>,
275275
/// All active threads in this guild that current user has permission to view.
276+
///
277+
/// A thread is guaranteed (for errors, not for panics) to be cached if a `MESSAGE_CREATE`
278+
/// event is fired in said thread, however an `INTERACTION_CREATE` may not have a private
279+
/// thread in cache.
276280
pub threads: Vec<GuildChannel>,
277281
/// A mapping of [`User`]s' Ids to their current presences.
278282
///

0 commit comments

Comments
 (0)