OttoBot/src/main/kotlin/nl/voidcorp/dbot/storage/GuildSettings.kt

17 lines
428 B
Kotlin

package nl.voidcorp.dbot.storage
import net.dv8tion.jda.core.entities.Guild
import nl.voidcorp.dbot.commands.GSM
data class GuildSettings(val prefixes: MutableList<String> = mutableListOf()) {
fun getPrefixes(): MutableCollection<String> {
return prefixes
}
val primaryPrefix: String
get() = prefixes.firstOrNull() ?: "!"
}
fun Guild.settings(): GuildSettings {
return GSM.getSettings(this)
}