
com.freya02.botcommands.api.commands.application.GlobalApplicationCommandManager.kt Maven / Gradle / Ivy
package com.freya02.botcommands.api.commands.application
import com.freya02.botcommands.internal.BContextImpl
import com.freya02.botcommands.internal.throwUser
class GlobalApplicationCommandManager internal constructor(context: BContextImpl): AbstractApplicationCommandManager(context) {
override fun isValidScope(scope: CommandScope) = scope.isGlobal
override fun checkScope(scope: CommandScope) {
if (!isValidScope(scope)) throwUser("You can only use global scopes in a GlobalApplicationCommandManager")
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy