Interface User

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

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

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: