Package net.dv8tion.jda.api.entities
Interface IMentionable
- All Superinterfaces:
Formattable
,ISnowflake
- All Known Subinterfaces:
ApplicationEmoji
,AudioChannel
,AudioChannelUnion
,Category
,Channel
,ChannelUnion
,Command
,CustomEmoji
,DefaultGuildChannelUnion
,ForumChannel
,GroupChannel
,GuildChannel
,GuildChannelUnion
,GuildMessageChannel
,GuildMessageChannelUnion
,IAgeRestrictedChannel
,ICategorizableChannel
,ICommandReference
,ICopyableChannel
,IInviteContainer
,IMemberContainer
,IPermissionContainer
,IPermissionContainerUnion
,IPositionableChannel
,IPostContainer
,ISlowmodeChannel
,IThreadContainer
,IThreadContainerUnion
,IVoiceStatusChannel
,IWebhookContainer
,IWebhookContainerUnion
,MediaChannel
,Member
,MessageChannel
,MessageChannelUnion
,NewsChannel
,PrivateChannel
,RichCustomEmoji
,Role
,SelfUser
,StageChannel
,StandardGuildChannel
,StandardGuildMessageChannel
,TextChannel
,ThreadChannel
,ThreadMember
,User
,UserSnowflake
,VoiceChannel
,Widget.Member
- All Known Implementing Classes:
Command.Subcommand
,Command.SubcommandGroup
,SlashCommandReference
Marks a mentionable entity.
Formattable
This interface extends Formattable
and can be used with a Formatter
such as used by String.format(String, Object...)
or PrintStream.printf(String, Object...)
.
This will use getAsMention()
rather than Object.toString()
!
Supported Features:
- Width/Left-Justification
- Ensures the size of a format (Example:%20s
- uses at minimum 20 chars;%-10s
- uses left-justified padding) - Precision
- Cuts the content to the specified size (Example:%.20s
)
More information on formatting syntax can be found in the format syntax documentation
!
Note: Some implementations also support the alternative flag.
- Since:
- 3.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
Retrieve a Mention for this Entity.Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
Method Details
-
getAsMention
Retrieve a Mention for this Entity. For the publicRole
(@everyone), this will return the literal string"@everyone"
.- Returns:
- A resolvable mention.
-
formatTo
- Specified by:
formatTo
in interfaceFormattable
-