Package com.mrivanplays.jdoa2
Class CurrentUser
java.lang.Object
com.mrivanplays.jdoa2.CurrentUser
- All Implemented Interfaces:
ISnowflake
Represents the user this application is running for.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the user as a discord formatted mention.Returns the user's avatar icon hashReturns the user's default avatar icon hash.Returns the discriminator of the user.Returns the user's effective avatar icon hash, effective meaning currently applied.getEmail()
Returns the email of the user, if so we have the scope provided.int
getFlags()
Returns bitwise calculated flags.getId()
Returns the snowflake, this object is holding.Returns the locale, set on the discord client by the user.Returns the username of the user.boolean
isBot()
Deprecated.Due to the nature of OAuth2 at this moment, bots are not allowed to use the various urls provided.boolean
Returns whenever the current user has 2FA enabled.boolean
Returns if the user has verified his email or not.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.mrivanplays.jdoa2.ISnowflake
getIdLong
-
Constructor Details
-
CurrentUser
-
-
Method Details
-
getId
Returns the snowflake, this object is holding.- Specified by:
getId
in interfaceISnowflake
- Returns:
- id snowflake
-
getUsername
Returns the username of the user.- Returns:
- username
-
getDiscriminator
Returns the discriminator of the user.A discriminator is a 4 digit number, appended after the user's name, divided by a "#" from the user name.
- Returns:
- discriminator
-
getAvatar
Returns the user's avatar icon hash- Returns:
- avatar icon hash
-
getDefaultAvatar
Returns the user's default avatar icon hash.- Returns:
- default avatar icon hash
-
getEffectiveAvatar
Returns the user's effective avatar icon hash, effective meaning currently applied.- Returns:
- currently applied avatar icon hash
-
isBot
Deprecated.Due to the nature of OAuth2 at this moment, bots are not allowed to use the various urls provided.Returns whenever the current user is a bot.- Returns:
true
if bot,false
otherwise
-
isTwoFAEnabled
public boolean isTwoFAEnabled()Returns whenever the current user has 2FA enabled.- Returns:
true
if 2fa enabled,false
otherwise
-
isVerified
public boolean isVerified()Returns if the user has verified his email or not.- Returns:
true
if verified,false
otherwise
-
getEmail
Returns the email of the user, if so we have the scope provided.- Returns:
-
getLocale
Returns the locale, set on the discord client by the user.- Returns:
- locale
-
getFlags
public int getFlags()Returns bitwise calculated flags.- Returns:
- flags
-
getAsMention
Gets the user as a discord formatted mention.- Returns:
- mention
-