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

discord4j.discordjson.json.ApplicationCommandData Maven / Gradle / Ivy

There is a newer version: 1.7.9
Show newest version
package discord4j.discordjson.json;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import discord4j.discordjson.Id;
import discord4j.discordjson.possible.Possible;
import org.immutables.value.Value;

import java.util.List;
import java.util.Map;
import java.util.Optional;

@Value.Immutable
@JsonSerialize(as = ImmutableApplicationCommandData.class)
@JsonDeserialize(as = ImmutableApplicationCommandData.class)
public interface ApplicationCommandData {

    static ImmutableApplicationCommandData.Builder builder() {
        return ImmutableApplicationCommandData.builder();
    }

    /**
     * unique id of the command
     */
    Id id();

    /**
     * Autoincrementing version identifier updated during substantial record changes
     */
    Id version();

    /**
     * guild id of the command, if not global
     */
    @JsonProperty("guild_id")
    Possible guildId();

    /**
     *  value of ApplicationCommandType (defaults to 1, CHAT_INPUT)
     */
    Possible type();

    /**
     * unique id of the parent application
     */
    @JsonProperty("application_id")
    Id applicationId();

    /**
     * 1-32 character name
     */
    String name();

    @JsonProperty("name_localizations")
    Possible>> nameLocalizations();

    /**
     * 0-100 character description
     */
    String description();

    @JsonProperty("description_localizations")
    Possible>> descriptionLocalizations();

    /**
     * the parameters for the command
     */
    Possible> options();

    /**
     * whether the command is enabled in DM by default when the app is added globally (default to true)
     *
     * @deprecated use {@link #contexts()} instead
     */
    @JsonProperty("dm_permission")
    @Deprecated
    Possible dmPermission();

    /**
     * whether the command is enabled by default when the app is added to a guild (default to true)
     */
    @JsonProperty("default_permission")
    @Deprecated
    Possible defaultPermission();

    /**
     * Set of permissions represented as a bit set
     */
    @JsonProperty("default_member_permissions")
    Optional defaultMemberPermissions();

    @JsonProperty("integration_types")
    List integrationTypes();

    @JsonProperty("contexts")
    List contexts();

    Possible nsfw();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy