public class SelfUserImpl extends UserImpl implements SelfUser
api, avatarId, bot, discriminator, fake, id, name, privateChannel
Constructor and Description |
---|
SelfUserImpl(java.lang.String id,
JDAImpl api) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getEmail()
Used to get the email of the currently logged in account.
NOTE: this is a AccountType.CLIENT method only! |
boolean |
isMfaEnabled()
If true, this account is protected by Multi-Factor authorizaiton.
If this is a Client account, then this describes the MFA status of the Client account. If this is a Bot account, then this describes the MFA status of the Client account that owns this Bot. |
boolean |
isVerified()
The status of this account's verification.
(Have you accepted the verification email) |
SelfUserImpl |
setEmail(java.lang.String email) |
SelfUserImpl |
setMfaEnabled(boolean enabled) |
SelfUserImpl |
setVerified(boolean verified) |
equals, getAsMention, getAvatarId, getAvatarUrl, getDefaultAvatarId, getDefaultAvatarUrl, getDiscriminator, getId, getJDA, getName, getPrivateChannel, hashCode, hasPrivateChannel, isBot, isFake, openPrivateChannel, setAvatarId, setBot, setDiscriminator, setFake, setName, setPrivateChannel, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAvatarId, getAvatarUrl, getDefaultAvatarId, getDefaultAvatarUrl, getDiscriminator, getJDA, getName, getPrivateChannel, hasPrivateChannel, isBot, openPrivateChannel
getCreationTime, getId
getAsMention
public SelfUserImpl(java.lang.String id, JDAImpl api)
public boolean isVerified()
SelfUser
isVerified
in interface SelfUser
public boolean isMfaEnabled()
SelfUser
isMfaEnabled
in interface SelfUser
public java.lang.String getEmail() throws AccountTypeException
SelfUser
AccountType.CLIENT
method only!getEmail
in interface SelfUser
AccountTypeException
- If this method is called when JDA#getAccountType()
does not return
AccountType.CLIENT
. E.g: If the logged in account isn't a Client account!public SelfUserImpl setVerified(boolean verified)
public SelfUserImpl setMfaEnabled(boolean enabled)
public SelfUserImpl setEmail(java.lang.String email)