diff --git a/src/main/kotlin/de/gianttree/discord/w2g/database/guild.kt b/src/main/kotlin/de/gianttree/discord/w2g/database/guild.kt index 55e1d8a..504bbb6 100644 --- a/src/main/kotlin/de/gianttree/discord/w2g/database/guild.kt +++ b/src/main/kotlin/de/gianttree/discord/w2g/database/guild.kt @@ -35,7 +35,8 @@ object Guilds : SnowflakeIdTable() { // SELECT * FROM guilds WHERE last_update = minSelect AND active = true val resultSet = - Guilds.select { (lastUpdate eqSubQuery minSelect) and (active eq true) }.firstOrNull() ?: return null + Guilds.select { (lastUpdate eqSubQuery minSelect) and (active eq true) }.limit(1).firstOrNull() + ?: return null return Guild.wrapRow(resultSet) }