public class GuildMemberEditSpec extends Object implements AuditSpec<GuildMemberModifyRequest>
Constructor and Description |
---|
GuildMemberEditSpec() |
Modifier and Type | Method and Description |
---|---|
GuildMemberModifyRequest |
asRequest() |
String |
getReason()
Returns the current audit log reason set on the spec.
|
GuildMemberEditSpec |
setDeafen(boolean deaf)
Sets whether the targeted
Member is deafened in voice channels. |
GuildMemberEditSpec |
setMute(boolean mute)
Sets whether the targeted
Member is muted in voice channels. |
GuildMemberEditSpec |
setNewVoiceChannel(Snowflake channel)
Sets the new voice channel to move the targeted
Member , if they are connected to voice. |
GuildMemberEditSpec |
setNickname(String nickname)
Sets a new nickname to the targeted
Member . |
GuildMemberEditSpec |
setReason(String reason)
Sets the reason to show in the audit logs when the spec is built.
|
GuildMemberEditSpec |
setRoles(Set<Snowflake> roles)
Sets the new role identifiers the targeted
Member is assigned. |
public GuildMemberEditSpec setNewVoiceChannel(@Nullable Snowflake channel)
Member
, if they are connected to voice. Requires the
Permission.MOVE_MEMBERS
permission.channel
- The voice channel identifier.public GuildMemberEditSpec setMute(boolean mute)
Member
is muted in voice channels. Requires the
Permission.MUTE_MEMBERS
permission.mute
- true
if the Member
should be muted, false
otherwise.public GuildMemberEditSpec setDeafen(boolean deaf)
Member
is deafened in voice channels. Requires the
Permission.DEAFEN_MEMBERS
permission.deaf
- true
if the Member
should be deafened, false
otherwise.public GuildMemberEditSpec setNickname(@Nullable String nickname)
Member
. Requires the Permission.MANAGE_NICKNAMES
permission.nickname
- The new nickname, can be null
or an empty string to reset.public GuildMemberEditSpec setRoles(Set<Snowflake> roles)
Member
is assigned. Requires the
Permission.MANAGE_ROLES
permission.roles
- The set of role identifiers.public GuildMemberEditSpec setReason(@Nullable String reason)
AuditSpec
setReason
in interface AuditSpec<GuildMemberModifyRequest>
reason
- The audit log reason.@Nullable public String getReason()
AuditSpec
getReason
in interface AuditSpec<GuildMemberModifyRequest>
public GuildMemberModifyRequest asRequest()
asRequest
in interface Spec<GuildMemberModifyRequest>