Package net.dv8tion.jda.api.managers
Interface SelfMemberManager
- All Superinterfaces:
AuditableRestAction<Void>
,Manager<SelfMemberManager>
,RestAction<Void>
Manager providing functionality to update one or more fields for the logged in account.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
Used to reset the avatar fieldstatic final long
Used to reset the banner fieldstatic final long
Used to reset the bio fieldstatic final long
Used to reset the name fieldFields inherited from interface net.dv8tion.jda.api.requests.restaction.AuditableRestAction
MAX_REASON_LENGTH
-
Method Summary
Modifier and TypeMethodDescriptionTheSelfMember
that will be modified by this SelfMemberManager.reset
(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 guild member of the currently logged in account.Sets the banner for the guild member of the currently logged in account.Sets the bio for the guild member of the currently logged in account.setNickname
(String nickname) Sets the nickname for the guild member of the currently logged in account.Methods inherited from interface net.dv8tion.jda.api.requests.restaction.AuditableRestAction
reason
Methods inherited from interface net.dv8tion.jda.api.managers.Manager
deadline, reset, setCheck, timeout
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
-
Field Details
-
NICKNAME
static final long NICKNAMEUsed to reset the name field- See Also:
-
AVATAR
static final long AVATARUsed to reset the avatar field- See Also:
-
BANNER
static final long BANNERUsed to reset the banner field- See Also:
-
BIO
static final long BIOUsed to reset the bio field- See Also:
-
-
Method Details
-
getMember
TheSelfMember
that will be modified by this SelfMemberManager.- Returns:
- The corresponding member
-
reset
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(SelfMemberManager.NAME | SelfMemberManager.AVATAR);
Flag Constants:
- Specified by:
reset
in interfaceManager<SelfMemberManager>
- Parameters:
fields
- Integer value containing the flags to reset.- Returns:
- SelfMemberManager for chaining convenience
-
reset
Resets the fields specified by the provided bit-flag patterns.
Example:manager.reset(SelfMemberManager.NAME, SelfMemberManager.AVATAR);
Flag Constants:
- Specified by:
reset
in interfaceManager<SelfMemberManager>
- Parameters:
fields
- Integer values containing the flags to reset.- Returns:
- SelfMemberManager for chaining convenience
-
setNickname
Sets the nickname for the guild member of the currently logged in account.The nickname is a name specific to the guild, when not set, your user's name will display.
- Parameters:
nickname
- The new nickname, max 32 characters in length,null
to remove the nickname- Returns:
- SelfMemberManager for chaining convenience
- Throws:
IllegalArgumentException
-- If the provided nickname is non-null and is blank or more than 32 characters in length
-
If the guild member of the current logged in account does not have
the
NICKNAME_CHANGE
permission
-
setAvatar
Sets the avatar for the guild member of the currently logged in account.- Parameters:
avatar
- AnIcon
instance representing the new Avatar,null
to reset the avatar to the user avatar.- Returns:
- SelfMemberManager for chaining convenience
-
setBanner
Sets the banner for the guild member of the currently logged in account.- Parameters:
banner
- AnIcon
instance representing the new banner,null
to reset the banner to the user banner.- Returns:
- SelfMemberManager for chaining convenience
-
setBio
Sets the bio for the guild member of the currently logged in account.- Parameters:
bio
- The new bio,null
to remove the bio- Returns:
- SelfMemberManager for chaining convenience
- Throws:
IllegalArgumentException
- If the provided bio is non-null and is blank or more than 190 characters in length
-