@@ -84,7 +84,7 @@ class GuildChannelManager extends CachedManager {
8484 * @returns {?(GuildChannel|ThreadChannel) }
8585 */
8686 resolve ( channel ) {
87- if ( channel instanceof ThreadChannel ) return super . resolve ( channel . id ) ;
87+ if ( channel instanceof ThreadChannel ) return super . cache . get ( channel . id ) ?? null ;
8888 return super . resolve ( channel ) ;
8989 }
9090
@@ -287,7 +287,7 @@ class GuildChannelManager extends CachedManager {
287287 const resolvedChannel = this . resolve ( channel ) ;
288288 if ( ! resolvedChannel ) throw new DiscordjsTypeError ( ErrorCodes . InvalidType , 'channel' , 'GuildChannelResolvable' ) ;
289289
290- const parent = options . parent && this . client . channels . resolveId ( options . parent ) ;
290+ const parentId = options . parent && this . client . channels . resolveId ( options . parent ) ;
291291
292292 if ( options . position !== undefined ) {
293293 await this . setPosition ( resolvedChannel , options . position , { position : options . position , reason : options . reason } ) ;
@@ -298,8 +298,8 @@ class GuildChannelManager extends CachedManager {
298298 ) ;
299299
300300 if ( options . lockPermissions ) {
301- if ( parent ) {
302- const newParent = this . resolve ( parent ) ;
301+ if ( parentId ) {
302+ const newParent = this . cache . get ( parentId ) ;
303303 if ( newParent ?. type === ChannelType . GuildCategory ) {
304304 permission_overwrites = newParent . permissionOverwrites . cache . map ( overwrite =>
305305 PermissionOverwrites . resolve ( overwrite , this . guild ) ,
@@ -322,7 +322,7 @@ class GuildChannelManager extends CachedManager {
322322 user_limit : options . userLimit ,
323323 rtc_region : options . rtcRegion ,
324324 video_quality_mode : options . videoQualityMode ,
325- parent_id : parent ,
325+ parent_id : parentId ,
326326 lock_permissions : options . lockPermissions ,
327327 rate_limit_per_user : options . rateLimitPerUser ,
328328 default_auto_archive_duration : options . defaultAutoArchiveDuration ,
0 commit comments