Package org.javacord.api.entity
Interface DiscordEntity
-
- All Known Subinterfaces:
ApplicationCommand,ApplicationCommandInteraction,Attachment,AuditLogEntry,AuditLogEntryTarget,AutocompleteInteraction,ButtonInteraction,Channel,ChannelCategory,ContextMenu,CustomEmoji,IncomingWebhook,Interaction,InteractionBase,KnownCustomEmoji,Message,MessageAttachment,MessageAuthor,MessageComponentInteraction,MessageComponentInteractionBase,MessageContextMenu,MessageContextMenuInteraction,ModalInteraction,PrivateChannel,RegularServerChannel,Role,SelectMenuInteraction,Server,ServerChannel,ServerForumChannel,ServerStageVoiceChannel,ServerTextChannel,ServerThreadChannel,ServerVoiceChannel,SlashCommand,SlashCommandInteraction,Sticker,StickerItem,StickerPack,TextChannel,ThreadMember,UnknownRegularServerChannel,UnknownServerChannel,User,UserContextMenu,UserContextMenuInteraction,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 java.time.InstantgetCreationTimestamp()Gets the creation date of the Discord entity, calculated from the id.static java.time.InstantgetCreationTimestamp(long entityId)Calculates the creation date from the given Discord entity id.longgetId()Gets the id of Discord entity.default java.lang.StringgetIdAsString()Gets the id of the Discord entity as a string.
-
-
-
Method Detail
-
getCreationTimestamp
static java.time.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 java.time.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 java.lang.String getIdAsString()
Gets the id of the Discord entity as a string.- Returns:
- The id of the Discord entity as a string.
-
-