Interface User

All Superinterfaces:
Formattable, IMentionable, ISnowflake
All Known Subinterfaces:
SelfUser

public interface User extends IMentionable
Represents a Discord User. Contains all publicly available information about a specific Discord User.

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 IMentionable.getAsMention() rather than Object.toString()!
Supported Features:

  • Alternative
    - Uses the Discord Tag (Username#Discriminator) instead (Example: %#s - results in getName()#getDiscriminator() -> Minn#6688)
  • 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!

See Also: