Interface ApplicationManager
- All Superinterfaces:
AuditableRestAction<Void>, Manager<ApplicationManager>, RestAction<Void>
Manager providing functionality to update one or more fields for the application associated with the bot.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classA config describing how the application is installed. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longUsed to set cover image fieldstatic final longUsed to set custom install url fieldstatic final longUsed to set description fieldstatic final longUsed to set icon fieldstatic final longUsed to set install params fieldstatic final longUsed to set integration types config fieldstatic final longUsed to set interaction endpoint url fieldstatic final longUsed to set tags fieldFields inherited from interface AuditableRestAction
MAX_REASON_LENGTH -
Method Summary
Modifier and TypeMethodDescriptionreset(long fields) Resets the fields specified by the provided bit-flag pattern.reset(long... fields) Resets the fields specified by the provided bit-flag patterns.setCoverImage(Icon coverImage) Sets the cover image of the application.setCustomInstallUrl(String customInstallUrl) Sets the custom install url for this application.setDescription(String description) Sets the description of the application.Sets the icon of the application.setInstallParams(ApplicationManager.IntegrationTypeConfig installParams) Sets the default installation parameters of this application.Sets the integration type config of this application.setInteractionsEndpointUrl(String interactionsEndpointUrl) Sets the interactions endpoint URL for this application.setTags(Collection<String> tags) Sets up to 5 unique tags for this application.Methods inherited from interface AuditableRestAction
reasonMethods inherited from interface RestAction
addCheck, and, and, complete, complete, completeAfter, delay, delay, delay, delay, flatMap, flatMap, getCheck, getJDA, map, mapToResult, onErrorFlatMap, onErrorFlatMap, onErrorMap, onErrorMap, onSuccess, queue, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, submit, submit, submitAfter, submitAfter, zip
-
Field Details
-
DESCRIPTION
static final long DESCRIPTIONUsed to set description field- See Also:
-
ICON
static final long ICONUsed to set icon field- See Also:
-
COVER_IMAGE
static final long COVER_IMAGEUsed to set cover image field- See Also:
-
INTERACTIONS_ENDPOINT_URL
static final long INTERACTIONS_ENDPOINT_URLUsed to set interaction endpoint url field- See Also:
-
TAGS
static final long TAGSUsed to set tags field- See Also:
-
CUSTOM_INSTALL_URL
static final long CUSTOM_INSTALL_URLUsed to set custom install url field- See Also:
-
INSTALL_PARAMS
static final long INSTALL_PARAMSUsed to set install params field- See Also:
-
INTEGRATION_TYPES_CONFIG
static final long INTEGRATION_TYPES_CONFIGUsed to set integration types config field- See Also:
-
-
Method Details
-
reset
Resets the fields specified by the provided bit-flag pattern. You can specify a combination by using a bitwise OR concat of the flag constants.
Example:manager.reset(ApplicationManager.ICON | ApplicationManager.COVER_IMAGE);Flag Constants:
- Specified by:
resetin interfaceManager<ApplicationManager>- Parameters:
fields- Integer value containing the flags to reset.- Returns:
- ApplicationManager for chaining convenience
-
reset
Resets the fields specified by the provided bit-flag patterns.
Example:manager.reset(ApplicationManager.ICON, ApplicationManager.COVER_IMAGE);Flag Constants:
- Specified by:
resetin interfaceManager<ApplicationManager>- Parameters:
fields- Integer values containing the flags to reset.- Returns:
- ApplicationManager for chaining convenience
-
setDescription
Sets the description of the application.- Parameters:
description- The new description (max 400 characters)- Returns:
- ApplicationManager for chaining convenience
- Throws:
IllegalArgumentException- If null is provided or the description is longer than 400
-
setIcon
Sets the icon of the application.- Parameters:
icon- The new icon- Returns:
- ApplicationManager for chaining convenience
-
setCoverImage
Sets the cover image of the application.
This is used for rich presence.- Parameters:
coverImage- The new coverImage- Returns:
- ApplicationManager for chaining convenience
-
setTags
-
setInteractionsEndpointUrl
@Nonnull @CheckReturnValue ApplicationManager setInteractionsEndpointUrl(@Nullable String interactionsEndpointUrl) Sets the interactions endpoint URL for this application.CAUTION:This will cause JDA to no longer receive interactions through gateway events.
- Parameters:
interactionsEndpointUrl- The interactions endpoint URL (max 2048 characters)- Returns:
- ApplicationManager for chaining convenience
- Throws:
IllegalArgumentException- If the provided URL is longer than 2048 characters
-
setCustomInstallUrl
@Nonnull @CheckReturnValue ApplicationManager setCustomInstallUrl(@Nullable String customInstallUrl) Sets the custom install url for this application.- Parameters:
customInstallUrl- The custom install URL (max 2048 characters)- Returns:
- ApplicationManager for chaining convenience
- Throws:
IllegalArgumentException- If the provided URL is longer than 2048 characters
-
setInstallParams
@Nonnull @CheckReturnValue ApplicationManager setInstallParams(@Nullable ApplicationManager.IntegrationTypeConfig installParams) Sets the default installation parameters of this application.This is used if the application does not use a
custom install URL. Configures which scopes and permissions should be applied to invite URLs of this application.- Parameters:
installParams- The default install parameters- Returns:
- ApplicationManager for chaining convenience
- See Also:
-
setIntegrationTypeConfig
@Nonnull @CheckReturnValue ApplicationManager setIntegrationTypeConfig(@Nullable Map<IntegrationType, ApplicationManager.IntegrationTypeConfig> config) Sets the integration type config of this application.This method accepts a map of the supported integration type to an
ApplicationManager.IntegrationTypeConfigdescribing the installation parameters.- Parameters:
config- The config used for installing this application as integration.- Returns:
- ApplicationManager for chaining convenience
- Throws:
IllegalArgumentException- If the config contains null- See Also:
-