Skip to content

Commit

Permalink
Fix bug with adding guilds
Browse files Browse the repository at this point in the history
  • Loading branch information
bombies committed Jan 10, 2024
1 parent fa4491b commit 371735d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/main/kotlin/main/main/Robertify.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import main.utils.component.interactions.slashcommand.AbstractSlashCommand
import main.utils.database.mongodb.AbstractMongoDatabase
import main.utils.database.mongodb.cache.BotDBCache
import main.utils.database.mongodb.cache.redis.guild.GuildRedisCache
import main.utils.database.mongodb.databases.GuildDB
import main.utils.json.locale.LocaleConfig
import main.utils.json.reminders.RemindersConfig
import main.utils.json.requestchannel.RequestChannelConfig
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/main/utils/json/guildconfig/GuildConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class GuildConfig(private val guild: Guild) : AbstractGuildConfig(guild) {
}

fun addGuild() {
require(guildHasInfo()) { "This guild is already added!" }
require(!guildHasInfo()) { "This guild is already added!" }
getDatabase().addGuild(guild.idLong)
}

Expand Down

0 comments on commit 371735d

Please sign in to comment.