@@ -45,16 +45,32 @@ impl From<ChannelId> for GenericChannelId {
4545}
4646
4747impl GenericChannelId {
48+ /// Copies this ID into a [`ChannelId`] and a [`ThreadId`].
49+ ///
50+ /// It is only correct to use this when you use both returned values,
51+ /// otherwise use [`Self::expect_channel`] or [`Self::expect_thread`].
4852 #[ must_use]
4953 pub fn split ( self ) -> ( ChannelId , ThreadId ) {
5054 ( self . expect_channel ( ) , self . expect_thread ( ) )
5155 }
5256
57+ /// Converts the type of this Id to [`ChannelId`].
58+ ///
59+ /// This converts the type without changing the inner value, therefore,
60+ /// is only correct when you have knowledge which is not in the type system.
61+ ///
62+ /// This should be used as rarely as [`Option::expect`].
5363 #[ must_use]
5464 pub fn expect_channel ( self ) -> ChannelId {
5565 ChannelId :: new ( self . get ( ) )
5666 }
5767
68+ /// Converts the type of this Id to [`ThreadId`].
69+ ///
70+ /// This converts the type without changing the inner value, therefore,
71+ /// is only correct when you have knowledge which is not in the type system.
72+ ///
73+ /// This should be used as rarely as [`Option::expect`].
5874 #[ must_use]
5975 pub fn expect_thread ( self ) -> ThreadId {
6076 ThreadId :: new ( self . get ( ) )
@@ -449,7 +465,7 @@ pub struct StageInstance {
449465#[ non_exhaustive]
450466pub struct ThreadsData {
451467 /// The threads channels.
452- pub threads : FixedArray < GuildChannel > ,
468+ pub threads : FixedArray < GuildThread > ,
453469 /// A thread member for each returned thread the current user has joined.
454470 pub members : FixedArray < ThreadMember > ,
455471 /// Whether there are potentially more threads that could be returned on a subsequent call.
0 commit comments