All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.freya022.botcommands.api.commands.text.builder.TextSubcommandBuilder.kt Maven / Gradle / Ivy

Go to download

A Kotlin-first (and Java) framework that makes creating Discord bots a piece of cake, using the JDA library.

There is a newer version: 3.0.0-alpha.22
Show newest version
package io.github.freya022.botcommands.api.commands.text.builder

import io.github.freya022.botcommands.api.core.BContext
import io.github.freya022.botcommands.internal.commands.mixins.INamedCommand
import io.github.freya022.botcommands.internal.commands.text.TextCommandInfo
import io.github.freya022.botcommands.internal.commands.text.TextSubcommandInfo

class TextSubcommandBuilder internal constructor(context: BContext, name: String,
                                                 override val parentInstance: INamedCommand) : TextCommandBuilder(context, name) {
    internal fun build(parentInstance: TextCommandInfo?): TextCommandInfo {
        require(variations.isNotEmpty()) {
            "Text command should have at least 1 variation"
        }

        return TextSubcommandInfo(this, parentInstance)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy