mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-06-09 07:18:22 +00:00
commit
85e253af1a
@ -132,7 +132,7 @@ val server = embeddedServer(Netty, port = 8080, ) {
|
||||
DiscordGuildCache.addGuild(guilds.associate {
|
||||
println("${it.id} ${it.name}")
|
||||
|
||||
it.id to Guild(it.id, it.name, it.icon, it.banner, it.roles)
|
||||
it.id to Guild(it.id, it.name, it.icon, it.banner, it.roles ?: emptyList())
|
||||
})
|
||||
|
||||
redirects[principal.state]?.let { redirect ->
|
||||
|
@ -72,7 +72,7 @@ object DiscordGuildCache {
|
||||
|
||||
guilds.forEach {
|
||||
cache[it.id] = CachedGuilds(
|
||||
Guild(it.id, it.name, it.icon, it.banner, it.roles),
|
||||
Guild(it.id, it.name, it.icon, it.banner, it.roles ?: emptyList()),
|
||||
Instant.now().plusSeconds(EXP_SECONDS),
|
||||
true
|
||||
)
|
||||
@ -105,5 +105,5 @@ data class Guild(
|
||||
val name: String,
|
||||
val icon: String?,
|
||||
val banner: String?,
|
||||
val roles: List<GuildRole>?,
|
||||
val roles: List<GuildRole> = emptyList(),
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user