Class GuildStickerImpl
java.lang.Object
net.dv8tion.jda.internal.entities.sticker.StickerItemImpl
net.dv8tion.jda.internal.entities.sticker.RichStickerImpl
net.dv8tion.jda.internal.entities.sticker.GuildStickerImpl
- All Implemented Interfaces:
ISnowflake
,GuildSticker
,RichSticker
,Sticker
,StickerItem
,StickerSnowflake
,StickerUnion
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.entities.sticker.Sticker
Sticker.StickerFormat, Sticker.Type
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionGuildStickerImpl
(long id, Sticker.StickerFormat format, String name, Set<String> tags, String description, boolean available, long guildId, JDA jda, User owner) -
Method Summary
Modifier and TypeMethodDescriptionReturns the underlyingGuildSticker
if applicable.copy()
delete()
Deletes this sticker from the guild.boolean
getGuild()
TheGuild
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.int
hashCode()
boolean
Whether this sticker is currently available.Retrieves the sticker owner.setAvailable
(boolean available) toString()
Methods inherited from class net.dv8tion.jda.internal.entities.sticker.RichStickerImpl
asStandardSticker, getDescription, getTags, setDescription, setTags
Methods inherited from class net.dv8tion.jda.internal.entities.sticker.StickerItemImpl
getFormatType, getIdLong, getName, setName
Methods inherited from interface net.dv8tion.jda.api.entities.sticker.GuildSticker
getGuildId, getType
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
-
Constructor Details
-
GuildStickerImpl
-
-
Method Details
-
asGuildSticker
Description copied from interface:StickerUnion
Returns the underlyingGuildSticker
if applicable.- Specified by:
asGuildSticker
in interfaceStickerUnion
- Overrides:
asGuildSticker
in classRichStickerImpl
- Returns:
- The
GuildSticker
-
isAvailable
public boolean isAvailable()Description copied from interface:GuildSticker
Whether this sticker is currently available.
A sticker becomes unavailable when the boost level of a guild drops and the slot becomes unusable.- Specified by:
isAvailable
in interfaceGuildSticker
- Returns:
- True, if this sticker is available
-
getGuildIdLong
public long getGuildIdLong()Description copied from interface:GuildSticker
The ID of the guild this sticker belongs to.- Specified by:
getGuildIdLong
in interfaceGuildSticker
- Returns:
- The guild id
-
getGuild
Description copied from interface:GuildSticker
TheGuild
this sticker belongs to.
This is null if the guild is not cached on creation, Which is often the case forJDA.retrieveSticker(...)
.- Specified by:
getGuild
in interfaceGuildSticker
- Returns:
- Possibly-null guild of the sticker
-
getOwner
Description copied from interface:GuildSticker
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.- Specified by:
getOwner
in interfaceGuildSticker
- Returns:
- Possibly-null sticker owner
- See Also:
-
retrieveOwner
Description copied from interface:GuildSticker
Retrieves the sticker owner.
IfGuildSticker.getOwner()
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
- Specified by:
retrieveOwner
in interfaceGuildSticker
- Returns:
CacheRestAction
- Type:User
-
delete
Description copied from interface:GuildSticker
Deletes this sticker from the guild.- Specified by:
delete
in interfaceGuildSticker
- Returns:
AuditableRestAction
-
getManager
Description copied from interface:GuildSticker
Modify this sticker usingGuildStickerManager
.
You can update multiple fields at once, by calling the respective setters before executing the request.- Specified by:
getManager
in interfaceGuildSticker
- Returns:
GuildStickerManager
-
setAvailable
-
copy
-
toString
- Overrides:
toString
in classRichStickerImpl
-
hashCode
public int hashCode()- Overrides:
hashCode
in classStickerItemImpl
-
equals
- Overrides:
equals
in classStickerItemImpl
-