public class InviteAction extends AuditableRestAction<Invite>
Invite Builder system created as an extension of RestAction
Invites.AuditableRestAction.EmptyRestAction<T>DEFAULT_FAILURE, DEFAULT_SUCCESS, LOG| Constructor | Description |
|---|---|
InviteAction(JDA api,
java.lang.String channelId) |
| Modifier and Type | Method | Description |
|---|---|---|
InviteAction |
setCheck(java.util.function.BooleanSupplier checks) |
Sets the last-second checks before finally executing the http request in the queue.
|
InviteAction |
setMaxAge(java.lang.Integer maxAge) |
Sets the max age in seconds for the invite.
|
InviteAction |
setMaxAge(java.lang.Long maxAge,
java.util.concurrent.TimeUnit timeUnit) |
Sets the max age for the invite.
|
InviteAction |
setMaxUses(java.lang.Integer maxUses) |
Sets the max uses for the invite.
|
InviteAction |
setTemporary(java.lang.Boolean temporary) |
Sets whether the invite should only grant temporary membership.
|
InviteAction |
setUnique(java.lang.Boolean unique) |
Sets whether discord should reuse a similar invite.
|
reasonequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomplete, complete, completeAfter, getJDA, isPassContext, queue, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, setPassContext, submit, submit, submitAfter, submitAfterpublic InviteAction(JDA api, java.lang.String channelId)
public InviteAction setCheck(java.util.function.BooleanSupplier checks)
RestActionfalse or throws an exception this will not be finished.
When an exception is thrown from the supplier it will be provided to the failure callback.setCheck in class AuditableRestAction<Invite>checks - The checks to run before executing the request, or null to run no checks@CheckReturnValue public final InviteAction setMaxAge(java.lang.Integer maxAge)
0 if the invite should never expire. Default is 86400 (24 hours).
null will reset this to the default value.maxAge - The max age for this invite or null to use the default value.java.lang.IllegalArgumentException - If maxAge is negative.@CheckReturnValue public final InviteAction setMaxAge(java.lang.Long maxAge, java.util.concurrent.TimeUnit timeUnit)
0 if the invite should never expire. Default is 86400 (24 hours).
null will reset this to the default value.maxAge - The max age for this invite or null to use the default value.timeUnit - The TimeUnit type of maxAge.java.lang.IllegalArgumentException - If maxAge is negative or maxAge is positive and timeUnit is null.@CheckReturnValue public final InviteAction setMaxUses(java.lang.Integer maxUses)
0 if the invite should have unlimited uses. Default is 0.
null will reset this to the default value.maxUses - The max uses for this invite or null to use the default value.java.lang.IllegalArgumentException - If maxUses is negative.@CheckReturnValue public final InviteAction setTemporary(java.lang.Boolean temporary)
false.temporary - Whether the invite should only grant temporary membership or null to use the default value.@CheckReturnValue public final InviteAction setUnique(java.lang.Boolean unique)
false.unique - Whether discord should reuse a similar invite or null to use the default value.