Interface GuildSticker
- All Superinterfaces:
ISnowflake
,RichSticker
,Sticker
,StickerSnowflake
Custom guild sticker created by a user.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.entities.sticker.Sticker
Sticker.StickerFormat, Sticker.Type
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondelete()
Deletes this sticker from the guild.getGuild()
TheGuild
this sticker belongs to.default String
The ID of the guild this sticker belongs to.long
The ID of the guild this sticker belongs to.Modify this sticker usingGuildStickerManager
.getOwner()
The user who created this sticker.default Sticker.Type
getType()
TheSticker Type
boolean
Whether this sticker is currently available.Retrieves the sticker owner.Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
Methods inherited from interface net.dv8tion.jda.api.entities.sticker.RichSticker
getDescription, getTags
Methods inherited from interface net.dv8tion.jda.api.entities.sticker.Sticker
getFormatType, getIcon, getIconUrl, getName
-
Method Details
-
getType
Description copied from interface:RichSticker
TheSticker Type
- Specified by:
getType
in interfaceRichSticker
- Returns:
- The type
-
isAvailable
boolean isAvailable()Whether this sticker is currently available.
A sticker becomes unavailable when the boost level of a guild drops and the slot becomes unusable.- Returns:
- True, if this sticker is available
-
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
-
getGuild
TheGuild
this sticker belongs to.
This is null if the guild is not cached on creation, Which is often the case forJDA.retrieveSticker(...)
.- Returns:
- Possibly-null guild of the sticker
-
getOwner
The user who created this sticker.
This is null if the sticker is retrieved from cache, since the owner is only provided for explicitly requested stickers.- Returns:
- Possibly-null sticker owner
- See Also:
-
retrieveOwner
Retrieves the sticker owner.
IfgetOwner()
is present, this will directly return the owner in a completedRestAction
without making a request. The user information might be outdated, you can useaction.useCache(false)
to force an update.Possible
ErrorResponses
include:MISSING_PERMISSIONS
The request was attempted after the account lostPermission.MANAGE_GUILD_EXPRESSIONS
in the guild
- Returns:
CacheRestAction
- Type:User
- Throws:
InsufficientPermissionException
- If the currently logged in account does not havePermission.MANAGE_GUILD_EXPRESSIONS
in the guild.
-
delete
Deletes this sticker from the guild.- Returns:
AuditableRestAction
- Throws:
InsufficientPermissionException
- If the currently logged in account does not haveMANAGE_GUILD_EXPRESSIONS
in the guild.
-
getManager
Modify this sticker usingGuildStickerManager
.
You can update multiple fields at once, by calling the respective setters before executing the request.- Returns:
GuildStickerManager
- Throws:
InsufficientPermissionException
- If the currently logged in account does not haveMANAGE_GUILD_EXPRESSIONS
in the guild.
-