diff --git a/src/cache.nim b/src/cache.nim index 5072885..babee9f 100644 --- a/src/cache.nim +++ b/src/cache.nim @@ -55,4 +55,10 @@ proc getUser*(cache: Cache, id: snowflake): User = if (member.user.id == id): return member.user - return newUser(sendRequest(endpoint("/users/" & $id), HttpGet, defaultHeaders())) \ No newline at end of file + return newUser(sendRequest(endpoint("/users/" & $id), HttpGet, defaultHeaders())) + +proc cacheGuildChannel*(cache: var Cache, guildID: snowflake, channel: Channel) = + ## Adds a channel in cache.guilds[guildID].channels. + ## Only used for internal library, dont touch! + var guild = cache.getGuild(guildID) + guild.channels.add(channel) \ No newline at end of file