Package discord4j.core.spec.legacy
Class LegacyUserEditSpec
- java.lang.Object
-
- discord4j.core.spec.legacy.LegacyUserEditSpec
-
- All Implemented Interfaces:
LegacySpec<discord4j.discordjson.json.UserModifyRequest>
public class LegacyUserEditSpec extends Object implements LegacySpec<discord4j.discordjson.json.UserModifyRequest>
LegacySpec used to modify the current user.- See Also:
- Modify Current User
-
-
Constructor Summary
Constructors Constructor Description LegacyUserEditSpec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description discord4j.discordjson.json.UserModifyRequest
asRequest()
LegacyUserEditSpec
setAvatar(Image avatar)
Sets the user's avatar.LegacyUserEditSpec
setUsername(String username)
Sets the user's username.
-
-
-
Method Detail
-
setUsername
public LegacyUserEditSpec setUsername(String username)
Sets the user's username. May cause the discriminator to be randomized.- Parameters:
username
- The user's username.- Returns:
- This spec.
-
setAvatar
public LegacyUserEditSpec setAvatar(@Nullable Image avatar)
Sets the user's avatar.- Parameters:
avatar
- The user's avatar.- Returns:
- This spec.
-
asRequest
public discord4j.discordjson.json.UserModifyRequest asRequest()
- Specified by:
asRequest
in interfaceLegacySpec<discord4j.discordjson.json.UserModifyRequest>
-
-