AuditableRestAction.EmptyRestAction
, ChannelAction
, InviteAction
, PermissionOverrideAction
, RoleAction
, WebhookAction
public abstract class AuditableRestAction<T> extends RestAction<T>
Modifier and Type | Class | Description |
---|---|---|
static class |
AuditableRestAction.EmptyRestAction<T> |
Specialized form of
AuditableRestAction that is used to provide information that
has already been retrieved or generated so that another request does not need to be made to Discord. |
DEFAULT_FAILURE, DEFAULT_SUCCESS, LOG
Constructor | Description |
---|---|
AuditableRestAction(JDA api,
net.dv8tion.jda.core.requests.Route.CompiledRoute route) |
|
AuditableRestAction(JDA api,
net.dv8tion.jda.core.requests.Route.CompiledRoute route,
okhttp3.RequestBody data) |
|
AuditableRestAction(JDA api,
net.dv8tion.jda.core.requests.Route.CompiledRoute route,
org.json.JSONObject data) |
Modifier and Type | Method | Description |
---|---|---|
AuditableRestAction<T> |
reason(java.lang.String reason) |
Applies the specified reason as audit-log reason field.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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)
public AuditableRestAction(JDA api, net.dv8tion.jda.core.requests.Route.CompiledRoute route, okhttp3.RequestBody data)
public AuditableRestAction(JDA api, net.dv8tion.jda.core.requests.Route.CompiledRoute route, org.json.JSONObject data)
@CheckReturnValue 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