discord4j.discordjson.json.ApplicationCommandData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of discord-json Show documentation
Show all versions of discord-json Show documentation
Discord entity domain as immutable Jackson objects
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();
}