Class AccountManagerImpl
java.lang.Object
net.dv8tion.jda.internal.requests.RestActionImpl<Void>
net.dv8tion.jda.internal.requests.restaction.AuditableRestActionImpl<Void>
net.dv8tion.jda.internal.managers.ManagerBase<AccountManager>
net.dv8tion.jda.internal.managers.AccountManagerImpl
- All Implemented Interfaces:
AccountManager
,Manager<AccountManager>
,RestAction<Void>
,AuditableRestAction<Void>
-
Field Summary
Fields inherited from class net.dv8tion.jda.internal.requests.RestActionImpl
LOG
Fields inherited from interface net.dv8tion.jda.api.managers.AccountManager
AVATAR, BANNER, NAME
Fields inherited from interface net.dv8tion.jda.api.requests.restaction.AuditableRestAction
MAX_REASON_LENGTH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionTheSelfUser
that will be modified by this AccountManager.reset()
Resets all fields for this Managerreset
(long fields) Resets the fields specified by the provided bit-flag pattern.reset
(long... fields) Resets the fields specified by the provided bit-flag patterns.Sets the avatar for the currently logged in accountSets the banner for the currently logged in accountSets the username for the currently logged in accountMethods inherited from class net.dv8tion.jda.internal.managers.ManagerBase
complete, deadline, isPermissionChecksEnabled, queue, setCheck, setPermissionChecksEnabled, timeout
Methods inherited from class net.dv8tion.jda.internal.requests.restaction.AuditableRestActionImpl
reason
Methods inherited from class net.dv8tion.jda.internal.requests.RestActionImpl
getCheck, getDefaultFailure, getDefaultSuccess, getDefaultTimeout, getJDA, handleResponse, isPassContext, priority, setDefaultFailure, setDefaultSuccess, setDefaultTimeout, setErrorMapper, setPassContext, submit
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.dv8tion.jda.api.requests.restaction.AuditableRestAction
reason
Methods inherited from interface net.dv8tion.jda.api.requests.RestAction
addCheck, and, and, complete, complete, completeAfter, delay, delay, delay, delay, flatMap, flatMap, getCheck, getJDA, map, mapToResult, onErrorFlatMap, onErrorFlatMap, onErrorMap, onErrorMap, onSuccess, queue, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, submit, submit, submitAfter, submitAfter, zip
-
Constructor Details
-
AccountManagerImpl
Creates a new AccountManager instance- Parameters:
selfUser
- TheSelfUser
to manage
-
-
Method Details
-
getSelfUser
Description copied from interface:AccountManager
TheSelfUser
that will be modified by this AccountManager.
This represents the currently logged in account.- Specified by:
getSelfUser
in interfaceAccountManager
- Returns:
- The corresponding SelfUser
-
reset
Description copied from interface:AccountManager
Resets the fields specified by the provided bit-flag pattern. You can specify a combination by using a bitwise OR concat of the flag constants.
Example:manager.reset(AccountManager.NAME | AccountManager.AVATAR);
Flag Constants:
- Specified by:
reset
in interfaceAccountManager
- Specified by:
reset
in interfaceManager<AccountManager>
- Overrides:
reset
in classManagerBase<AccountManager>
- Parameters:
fields
- Integer value containing the flags to reset.- Returns:
- AccountManager for chaining convenience
-
reset
Description copied from interface:AccountManager
Resets the fields specified by the provided bit-flag patterns.
Example:manager.reset(AccountManager.NAME, AccountManager.AVATAR);
Flag Constants:
- Specified by:
reset
in interfaceAccountManager
- Specified by:
reset
in interfaceManager<AccountManager>
- Overrides:
reset
in classManagerBase<AccountManager>
- Parameters:
fields
- Integer values containing the flags to reset.- Returns:
- AccountManager for chaining convenience
-
reset
Description copied from interface:Manager
Resets all fields for this Manager- Specified by:
reset
in interfaceManager<AccountManager>
- Overrides:
reset
in classManagerBase<AccountManager>
- Returns:
- The current Manager with all settings reset to default
-
setName
Description copied from interface:AccountManager
Sets the username for the currently logged in account- Specified by:
setName
in interfaceAccountManager
- Parameters:
name
- The new username- Returns:
- AccountManager for chaining convenience
-
setAvatar
Description copied from interface:AccountManager
Sets the avatar for the currently logged in account- Specified by:
setAvatar
in interfaceAccountManager
- Parameters:
avatar
- AnIcon
instance representing the new Avatar for the current account,null
to reset the avatar to the default avatar.- Returns:
- AccountManager for chaining convenience
-
setBanner
Description copied from interface:AccountManager
Sets the banner for the currently logged in account- Specified by:
setBanner
in interfaceAccountManager
- Parameters:
banner
- AnIcon
instance representing the new banner for the current account,null
to reset the banner to the default banner.- Returns:
- AccountManager for chaining convenience
-