public abstract class AuditableRestAction<T> extends RestAction<T>
Modifier and Type | Class and Description |
---|---|
static class |
AuditableRestAction.EmptyRestAction<T> |
DEFAULT_FAILURE, DEFAULT_SUCCESS, LOG
Constructor and Description |
---|
AuditableRestAction(JDA api,
net.dv8tion.jda.core.requests.Route.CompiledRoute route,
java.lang.Object data) |
Modifier and Type | Method and Description |
---|---|
AuditableRestAction<T> |
reason(java.lang.String reason)
Applies the specified reason as audit-log reason field.
|
complete, complete, completeAfter, getJDA, queue, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, submit, submit, submitAfter, submitAfter
public AuditableRestAction(JDA api, net.dv8tion.jda.core.requests.Route.CompiledRoute route, java.lang.Object data)
public AuditableRestAction<T> reason(java.lang.String reason)
null
it will be treated as not set.
Reasons for any AuditableRestAction may be retrieved
via AuditLogEntry.getReason()
in iterable AuditLogPaginationActions
from Guild.getAuditLogs()
!
This will specify the reason via the X-Audit-Log-Reason
Request Header.
Note: This may not be available to accounts for AccountType.CLIENT
.
Using methods with a reason parameter will always work and override this header.
(ct. GuildController.ban(User, int, String)
)
reason
- The reason for this action which should be logged in the Guild's AuditLogs