Class EntitySelectMenu.DefaultValue
java.lang.Object
net.dv8tion.jda.api.components.selections.EntitySelectMenu.DefaultValue
- All Implemented Interfaces:
ISnowflake,SerializableData
- Enclosing interface:
EntitySelectMenu
public static class EntitySelectMenu.DefaultValue
extends Object
implements ISnowflake, SerializableData
Represents the default values used in
The value is
EntitySelectMenu.getDefaultValues().
The value is
typed correspondingly to the menu entity types.
The value is represented by the ID, corresponding to the entity of that ID.
-
Method Summary
Modifier and TypeMethodDescriptionchannel(long id) Creates a default value of typeEntitySelectMenu.SelectTarget.CHANNELwith the provided id.Creates a default value of typeEntitySelectMenu.SelectTarget.CHANNELwith the provided id.booleanfrom(GuildChannel channel) Creates a default value of typeEntitySelectMenu.SelectTarget.CHANNELfor the provided channel.Creates a default value of typeEntitySelectMenu.SelectTarget.ROLEfor the provided role.from(UserSnowflake user) Creates a default value of typeEntitySelectMenu.SelectTarget.USERfor the provided user.fromData(DataObject object) Parses the providedDataObjectinto the default value.longThe Snowflake id of this entity.getType()inthashCode()role(long id) Creates a default value of typeEntitySelectMenu.SelectTarget.ROLEwith the provided id.Creates a default value of typeEntitySelectMenu.SelectTarget.ROLEwith the provided id.toData()SerializedDataObjectfor this object.toString()user(long id) Creates a default value of typeEntitySelectMenu.SelectTarget.USERwith the provided id.Creates a default value of typeEntitySelectMenu.SelectTarget.USERwith the provided id.Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getTimeCreated
-
Method Details
-
fromData
Parses the providedDataObjectinto the default value.- Parameters:
object- The serialized default value, with a valid type and id- Returns:
- Parsed default value
- Throws:
IllegalArgumentException- If the provided object is invalid or missing required keys
-
from
Creates a default value of typeEntitySelectMenu.SelectTarget.USERfor the provided user.- Parameters:
user- The corresponding user- Returns:
- The default value
- Throws:
IllegalArgumentException- If null is provided
-
from
Creates a default value of typeEntitySelectMenu.SelectTarget.ROLEfor the provided role.- Parameters:
role- The corresponding role- Returns:
- The default value
- Throws:
IllegalArgumentException- If null is provided
-
from
Creates a default value of typeEntitySelectMenu.SelectTarget.CHANNELfor the provided channel.- Parameters:
channel- The corresponding channel- Returns:
- The default value
- Throws:
IllegalArgumentException- If null is provided
-
role
Creates a default value of typeEntitySelectMenu.SelectTarget.ROLEwith the provided id.- Parameters:
id- The role id- Returns:
- The default value
-
role
Creates a default value of typeEntitySelectMenu.SelectTarget.ROLEwith the provided id.- Parameters:
id- The role id- Returns:
- The default value
- Throws:
IllegalArgumentException- If the provided id is not a valid snowflake
-
user
Creates a default value of typeEntitySelectMenu.SelectTarget.USERwith the provided id.- Parameters:
id- The user id- Returns:
- The default value
-
user
Creates a default value of typeEntitySelectMenu.SelectTarget.USERwith the provided id.- Parameters:
id- The user id- Returns:
- The default value
- Throws:
IllegalArgumentException- If the provided id is not a valid snowflake
-
channel
Creates a default value of typeEntitySelectMenu.SelectTarget.CHANNELwith the provided id.- Parameters:
id- The channel id- Returns:
- The default value
-
channel
Creates a default value of typeEntitySelectMenu.SelectTarget.CHANNELwith the provided id.- Parameters:
id- The channel id- Returns:
- The default value
- Throws:
IllegalArgumentException- If the provided id is not a valid snowflake
-
getIdLong
public long getIdLong()Description copied from interface:ISnowflakeThe Snowflake id of this entity. This is unique to every entity and will never change.- Specified by:
getIdLongin interfaceISnowflake- Returns:
- Long containing the Id.
-
getType
-
toData
Description copied from interface:SerializableDataSerializedDataObjectfor this object.- Specified by:
toDatain interfaceSerializableData- Returns:
DataObject
-
hashCode
public int hashCode() -
equals
-
toString
-