Oceanic
Oceanic copied to clipboard
Fix closed thread not being cached globally in Channels#get
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