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

com.freya02.botcommands.api.commands.application.GuildApplicationCommandManager.kt Maven / Gradle / Ivy

package com.freya02.botcommands.api.commands.application

import com.freya02.botcommands.internal.BContextImpl
import com.freya02.botcommands.internal.throwUser
import net.dv8tion.jda.api.entities.Guild

class GuildApplicationCommandManager internal constructor(context: BContextImpl, val guild: Guild): AbstractApplicationCommandManager(context) {
    override fun isValidScope(scope: CommandScope): Boolean = !scope.isGlobal

    override fun checkScope(scope: CommandScope) {
        if (!isValidScope(scope)) throwUser("You can only use non-global scopes in a GuildApplicationCommandManager")
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy