Oceanic icon indicating copy to clipboard operation
Oceanic copied to clipboard

Fix closed thread not being cached globally in Channels#get

Open TheKodeToad opened this issue 8 months ago • 0 comments

Util#updateChannel constructs the thread itself meaning that it doesn't set the value in Client#threadGuildMap (and therefore client.getChannel(id)).

I hope I did not miss anything - but I believe this only affects this function (and therefore you will probably only encounter this with closed threads or if you don't have the relevant intent (GUILDS?) (idk this is just embarassing)) and behaves the same except properly populating the map

https://github.com/OceanicJS/Oceanic/blob/84665ca5cf91dc16cb6a92d8276995bee716f8cb/lib/routes/Channels.ts#L576-L587

I assumed there was a specific reason for the old code, so please let me know if that's the case

TheKodeToad avatar Apr 26 '25 20:04 TheKodeToad