Package net.dv8tion.jda.api.managers
Interface GuildStickerManager
- All Superinterfaces:
AuditableRestAction<Void>
,Manager<GuildStickerManager>
,RestAction<Void>
Manager providing functionality to update one or more fields for
GuildSticker
.
Example
manager.setName("catDance")
.setDescription("Cat dancing")
.queue();
manager.reset(GuildStickerManager.NAME | GuildStickerManager.TAGS)
.setName("dogDance")
.setTags("dancing", "dog")
.queue();
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final long
Used to reset description fieldstatic final long
Used to reset name fieldstatic final long
Used to reset tags fieldFields inherited from interface net.dv8tion.jda.api.requests.restaction.AuditableRestAction
MAX_REASON_LENGTH
-
Method Summary
Modifier and TypeMethodDescriptiongetGuild()
TheGuild
this Manager'sGuildSticker
is in.default String
The ID of the guild this sticker belongs to.long
The ID of the guild this sticker belongs to.reset
(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.setDescription
(String description) Sets the description of the sticker.Sets the name of the sticker.default GuildStickerManager
Sets the tags of the sticker.setTags
(Collection<String> tags) Sets the tags of the sticker.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
-
NAME
static final long NAMEUsed to reset name field- See Also:
-
DESCRIPTION
static final long DESCRIPTIONUsed to reset description field- See Also:
-
TAGS
static final long TAGSUsed to reset tags 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(GuildStickerManager.NAME | GuildStickerManager.TAGS);
Flag Constants:
- Specified by:
reset
in interfaceManager<GuildStickerManager>
- Parameters:
fields
- Integer value containing the flags to reset.- Returns:
- GuildStickerManager for chaining convenience
-
reset
Resets the fields specified by the provided bit-flag patterns.
Example:manager.reset(GuildStickerManager.NAME, GuildStickerManager.TAGS);
Flag Constants:
- Specified by:
reset
in interfaceManager<GuildStickerManager>
- Parameters:
fields
- Integer value containing the flags to reset.- Returns:
- GuildStickerManager for chaining convenience
-
getGuild
TheGuild
this Manager'sGuildSticker
is in.This is null if
GuildSticker.getManager()
is used on a sticker with an uncached guild.- Returns:
- The
Guild
, or null if not present. - See Also:
-
getGuildIdLong
long getGuildIdLong()The ID of the guild this sticker belongs to.- Returns:
- The guild id
-
getGuildId
The ID of the guild this sticker belongs to.- Returns:
- The guild id
-
setName
Sets the name of the sticker.A sticker name must be between 2-30 characters long!
Example:
catDance
ordogWave
- Parameters:
name
- The new name for the sticker (2-30 characters)- Returns:
- GuildStickerManager for chaining convenience
- Throws:
IllegalArgumentException
- If the provided name isnull
or not between 2-30 characters long
-
setDescription
Sets the description of the sticker.A sticker description must be between 2-100 characters long!
- Parameters:
description
- The new description for the sticker (2-100 characters)- Returns:
- GuildStickerManager for chaining convenience
- Throws:
IllegalArgumentException
- If the provided description isnull
or not between 2-100 characters long
-
setTags
Sets the tags of the sticker.
These are used for auto-complete when sending a message in the client, and for the sticker picker menu.The combined list of sticker tags must at most be 200 characters long!
Example:
catDance
ordogWave
- Parameters:
tags
- The new tags for the sticker (up to 200 characters)- Returns:
- GuildStickerManager for chaining convenience
- Throws:
IllegalArgumentException
-- If
tags
isnull
- If
tags
is empty - If
tags
containsnull
or empty strings - If the concatenated tags are more than 200 characters long (including commas between tags)
- If
-
setTags
Sets the tags of the sticker.
These are used for auto-complete when sending a message in the client, and for the sticker picker menu.The combined list of sticker tags must at most be 200 characters long!
Example:
catDance
ordogWave
- Parameters:
tags
- The new tags for the sticker (up to 200 characters)- Returns:
- GuildStickerManager for chaining convenience
- Throws:
IllegalArgumentException
-- If
tags
isnull
- If
tags
is empty - If
tags
containsnull
or empty strings - If the concatenated tags are more than 200 characters long (including commas between tags)
- If
-