mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2026-10-26 01:21:17 +09:00
asdf10
This commit is contained in:
1 file changed
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user