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

discord4j.discordjson.json.InteractionData 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;

@Value.Immutable
@JsonSerialize(as = ImmutableInteractionData.class)
@JsonDeserialize(as = ImmutableInteractionData.class)
public interface InteractionData {

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

    /** id of the interaction */
    Id id();

    /** id of the application this interaction is for */
    @JsonProperty("application_id")
    Id applicationId();

    /** the type of the interaction */
    int type();

    /** the command data payload */
    Possible data();

    /** the guild it was sent from */
    @JsonProperty("guild_id")
    Possible guildId();

    /** Partial Channel that the interaction was sent from */
    Possible channel();

    /** the channel it was sent from */
    @JsonProperty("channel_id")
    Possible channelId();

    /** guild member data for the invoking user */
    Possible member();

    /** user object for the invoking user, if invoked in a DM */
    Possible user();

    /** a continuation token for responding to the interaction */
    String token();

    /** read-only property, always 1 */
    int version();

    /** message associated with the interaction. */
    Possible message();

    /** The issuing user's client locale. Present on all interactions except ping */
    Possible locale();

    /** The guild's locale, if invoked in a guild. Defaults to English for non-community servers */
    @JsonProperty("guild_locale")
    Possible guildLocale();

    @JsonProperty("app_permissions")
    Possible appPermissions();

    @JsonProperty("entitlements")
    List entitlements();

    @JsonProperty("authorizing_integration_owners")
    Map authorizingIntegrationOwners();

    Possible context();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy