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 |
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.
|
reason
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 InviteAction(JDA api, java.lang.String channelId)
@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.