Package org.javacord.api.entity
Interface DiscordEntity
-
- All Known Subinterfaces:
AuditLogEntry,AuditLogEntryTarget,Channel,ChannelCategory,CustomEmoji,GroupChannel,KnownCustomEmoji,Message,MessageAttachment,MessageAuthor,PrivateChannel,Role,Server,ServerChannel,ServerTextChannel,ServerVoiceChannel,TextChannel,User,VoiceChannel,Webhook
public interface DiscordEntityThis class represents a Discord entity.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description DiscordApigetApi()Gets the discord api instance.default InstantgetCreationTimestamp()Gets the creation date of the Discord entity, calculated from the id.static InstantgetCreationTimestamp(long entityId)Calculates the creation date from the given Discord entity id.longgetId()Gets the id of Discord entity.default StringgetIdAsString()Gets the id of the Discord entity as a string.
-
-
-
Method Detail
-
getCreationTimestamp
static Instant getCreationTimestamp(long entityId)
Calculates the creation date from the given Discord entity id.- Parameters:
entityId- The entity it to calculate from.- Returns:
- The creation date of the Discord entity.
- See Also:
- Discord docs
-
getCreationTimestamp
default Instant getCreationTimestamp()
Gets the creation date of the Discord entity, calculated from the id.- Returns:
- The creation date of the Discord entity.
- See Also:
- Discord docs
-
getApi
DiscordApi getApi()
Gets the discord api instance.- Returns:
- The discord api instance.
-
getId
long getId()
Gets the id of Discord entity.- Returns:
- The id of Discord entity.
- See Also:
- Discord docs
-
getIdAsString
default String getIdAsString()
Gets the id of the Discord entity as a string.- Returns:
- The id of the Discord entity as a string.
-
-