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

io.github.freya022.botcommands.api.commands.application.CommandScope Maven / Gradle / Ivy

package io.github.freya022.botcommands.api.commands.application;

import io.github.freya022.botcommands.api.commands.application.annotations.DeclarationFilter;
import io.github.freya022.botcommands.api.commands.application.annotations.Test;
import io.github.freya022.botcommands.api.core.config.BApplicationConfigBuilder;

/**
 * Defines command scopes for application commands.
 */
public enum CommandScope {
    /**
     * The guild command scope, only pushes application commands to the guilds
     * 
Can be filtered with {@link DeclarationFilter @DeclarationFilter}. *
Can be forced with {@link BApplicationConfigBuilder#forceGuildCommands(boolean)} and {@link Test @Test} */ GUILD(false, true), /** * The global command scope, pushes this command to the first shard * *

Cannot be filtered on a per-guild basis */ GLOBAL(true, false), /** * The global command scope, but with DMs disabled, pushes this command to the first shard *
This might be useful to have guild commands but without having to push them on every guild * *

Cannot be filtered on a per-guild basis */ GLOBAL_NO_DM(true, true); private final boolean isGlobal; private final boolean guildOnly; CommandScope(boolean isGlobal, boolean guildOnly) { this.isGlobal = isGlobal; this.guildOnly = guildOnly; } public boolean isGlobal() { return isGlobal; } public boolean isGuildOnly() { return guildOnly; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy