Skip to content

Commit 0101d86

Browse files
committed
fix: Inject this.Discord to DiscordThreadResult's
Fixes #666
1 parent 4d7907f commit 0101d86

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

DisCatSharp/Net/Rest/DiscordApiClient.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6170,6 +6170,7 @@ internal async Task<DiscordThreadResult> GetJoinedPrivateArchivedThreadsAsync(ul
61706170
var res = await this.DoRequestAsync(this.Discord, bucket, url, RestRequestMethod.GET, route).ConfigureAwait(false);
61716171

61726172
var threadReturn = DiscordJson.DeserializeObject<DiscordThreadResult>(res.Response, this.Discord);
6173+
threadReturn.Threads.ForEach(x => x.Discord = this.Discord);
61736174

61746175
return threadReturn;
61756176
}
@@ -6198,6 +6199,7 @@ internal async Task<DiscordThreadResult> GetPublicArchivedThreadsAsync(ulong cha
61986199
var res = await this.DoRequestAsync(this.Discord, bucket, url, RestRequestMethod.GET, route).ConfigureAwait(false);
61996200

62006201
var threadReturn = DiscordJson.DeserializeObject<DiscordThreadResult>(res.Response, this.Discord);
6202+
threadReturn.Threads.ForEach(x => x.Discord = this.Discord);
62016203

62026204
return threadReturn;
62036205
}
@@ -6226,6 +6228,7 @@ internal async Task<DiscordThreadResult> GetPrivateArchivedThreadsAsync(ulong ch
62266228
var res = await this.DoRequestAsync(this.Discord, bucket, url, RestRequestMethod.GET, route).ConfigureAwait(false);
62276229

62286230
var threadReturn = DiscordJson.DeserializeObject<DiscordThreadResult>(res.Response, this.Discord);
6231+
threadReturn.Threads.ForEach(x => x.Discord = this.Discord);
62296232

62306233
return threadReturn;
62316234
}

0 commit comments

Comments
 (0)