Interface InviteBuilderDelegate
-
public interface InviteBuilderDelegateThis class is internally used by theInviteBuilderto create invites. You usually don't want to interact with this object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletableFuture<Invite>create()Creates the invite.voidsetAuditLogReason(String reason)Sets the reason for the creation.voidsetMaxAgeInSeconds(int maxAge)Sets the duration of the invite in seconds before expiry, or 0 for never.voidsetMaxUses(int maxUses)Sets the max number of uses or 0 for unlimited.voidsetNeverExpire()Sets the invite to never expire.voidsetTemporary(boolean temporary)Sets whether this invite should only grant temporary membership or not.voidsetUnique(boolean unique)Sets whether this invite should be unique or not.
-
-
-
Method Detail
-
setAuditLogReason
void setAuditLogReason(String reason)
Sets the reason for the creation. This reason will be visible in the audit log entry(s).- Parameters:
reason- The reason for this update.
-
setMaxAgeInSeconds
void setMaxAgeInSeconds(int maxAge)
Sets the duration of the invite in seconds before expiry, or 0 for never. The default value is 86400 (24 hours).- Parameters:
maxAge- The duration of the invite in seconds before expiry, or 0 for never.
-
setNeverExpire
void setNeverExpire()
Sets the invite to never expire. This is the same as setting the max age to 0.- See Also:
setMaxAgeInSeconds(int)
-
setMaxUses
void setMaxUses(int maxUses)
Sets the max number of uses or 0 for unlimited. The default value is 0 (unlimited uses).- Parameters:
maxUses- The max number of uses or 0 for unlimited.
-
setTemporary
void setTemporary(boolean temporary)
Sets whether this invite should only grant temporary membership or not. The default value is false.- Parameters:
temporary- Whether this invite should only grant temporary membership or not.
-
setUnique
void setUnique(boolean unique)
Sets whether this invite should be unique or not. The default value is false.- Parameters:
unique- Whether this invite should be unique or not.
-
create
CompletableFuture<Invite> create()
Creates the invite.- Returns:
- The created invite.
-
-