Class ApplicationCommandOptionChoice

    • Field Detail

      • MAX_NAME_LENGTH

        public static final int MAX_NAME_LENGTH
        The maximum amount of characters that can be in an application command option choice name.
        See Also:
        Constant Field Values
      • MAX_VALUE_LENGTH

        public static final int MAX_VALUE_LENGTH
        The maximum amount of characters that can be in an application command option choice value.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ApplicationCommandOptionChoice

        public ApplicationCommandOptionChoice​(GatewayDiscordClient gateway,
                                              discord4j.discordjson.json.ApplicationCommandOptionChoiceData data)
        Constructs an ApplicationCommandOptionChoice with an associated GatewayDiscordClient and Discord data.
        Parameters:
        gateway - The GatewayDiscordClient associated to this object, must be non-null.
        data - The raw data as represented by Discord, must be non-null.
    • Method Detail

      • getName

        public String getName()
        Gets the name of this choice.
        Returns:
        The name of this choice.
      • getValue

        public Object getValue()
        Gets the value of this choice.
        Returns:
        The value of this choice.
      • asString

        public String asString()
        Gets the value of this choice as a string.
        Returns:
        The value of this choice as a string.
      • asLong

        public long asLong()
        Gets the value of this choice as a long.
        Returns:
        The value of this choice as a long.
      • asDouble

        public double asDouble()
        Gets the value of this choice as a double.
        Returns:
        The value of this choice as a double.