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()TheGuildthis sticker belongs to.default StringThe ID of the guild this sticker belongs to.longThe ID of the guild this sticker belongs to.Modify this sticker usingGuildStickerManager.getOwner()The user who created this sticker.default Sticker.TypegetType()TheSticker TypebooleanWhether this sticker is currently available.Retrieves the sticker owner.Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreatedMethods inherited from interface net.dv8tion.jda.api.entities.sticker.RichSticker
getDescription, getTagsMethods inherited from interface net.dv8tion.jda.api.entities.sticker.Sticker
getFormatType, getIcon, getIconUrl, getName
-
Method Details
-
getType
Description copied from interface:RichStickerTheSticker Type- Specified by:
getTypein 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
TheGuildthis 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 completedRestActionwithout making a request. The user information might be outdated, you can useaction.useCache(false)to force an update.Possible
ErrorResponsesinclude:MISSING_PERMISSIONS
The request was attempted after the account lostPermission.MANAGE_GUILD_EXPRESSIONSin the guild
- Returns:
CacheRestAction- Type:User- Throws:
InsufficientPermissionException- If the currently logged in account does not havePermission.MANAGE_GUILD_EXPRESSIONSin the guild.
-
delete
Deletes this sticker from the guild.- Returns:
AuditableRestAction- Throws:
InsufficientPermissionException- If the currently logged in account does not haveMANAGE_GUILD_EXPRESSIONSin 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_EXPRESSIONSin the guild.
-