Package net.dv8tion.jda.api.managers
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 class
A config describing how the application is installed. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
Used to set cover image fieldstatic final long
Used to set custom install url fieldstatic final long
Used to set description fieldstatic final long
Used to set icon fieldstatic final long
Used to set install params fieldstatic final long
Used to set integration types config fieldstatic final long
Used to set interaction endpoint url fieldstatic final long
Used to set tags fieldFields inherited from interface net.dv8tion.jda.api.requests.restaction.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 net.dv8tion.jda.api.requests.restaction.AuditableRestAction
reason
Methods inherited from interface net.dv8tion.jda.api.managers.Manager
deadline, reset, setCheck, timeout
Methods inherited from interface net.dv8tion.jda.api.requests.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:
reset
in 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:
reset
in 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
Sets up to 5 unique tags for this application.- Parameters:
tags
- Up to 5 tags (each max 20 characters)- Returns:
- ApplicationManager for chaining convenience
- Throws:
IllegalArgumentException
- If more than 5 tags are provided, or if any of the tags is null, blank, empty, or longer than 20 characters
-
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.IntegrationTypeConfig
describing 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:
-