Interface EntityRef<E extends @NonNull Entity>

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.

@FunctionalInterface public interface EntityRef<E extends @NonNull Entity>
A reference to a Discord entity that can be used to fetch the entity.
Since:
1.0
Version:
1.0
  • 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 InvalidArgumentException if an entity exists but there is a mismatch.
      Since:
      1.0