- Type Parameters:
E- The entity type.
- All Known Implementing Classes:
EntityRef.ChannelRef,EntityRef.MessageRef,EntityRef.RoleRef,EntityRef.UserRef
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A reference to a Discord entity that can be used to fetch the entity.
- Since:
- 1.0
- Version:
- 1.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordEntityRef.ChannelRef<C extends @NonNull Channel>A reference to a channel.static final recordA reference to a message.static final recordA reference to a role.static final recordA reference to a user. -
Method Summary
Modifier and TypeMethodDescriptionget(GatewayDiscordClient client) Obtains the referenced entity.
-
Method Details
-
get
Obtains the referenced entity.- Parameters:
client- The client to use to connect to Discord.- Returns:
- The entity. May be empty if there is no entity that matches the reference, and
may fail with a
InvalidArgumentExceptionif an entity exists but there is a mismatch. - Since:
- 1.0
-