mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-06-09 07:18:22 +00:00
asdf10
This commit is contained in:
parent
1e1cd50e52
commit
cb5bbf73c3
@ -19,7 +19,7 @@ object DiscordGuildCache {
|
||||
private suspend fun getCachedGuilds(guildId: String): Guild? {
|
||||
val now = Instant.now()
|
||||
|
||||
if(cache.isEmpty() || !cache.containsKey(guildId) || cache[guildId]!!.timestamp.plusSeconds(EXP_SECONDS).isBefore(now)) {
|
||||
if(cache.isEmpty() || !cache.containsKey(guildId) || cache[guildId]!!.timestamp.plusSeconds(EXP_SECONDS).isAfter(now)) {
|
||||
fetchAllGuilds()
|
||||
}
|
||||
return cache[guildId]?.guild
|
||||
|
Loading…
x
Reference in New Issue
Block a user