Package discord4j.core.object.entity
Class GuildSticker
- java.lang.Object
-
- discord4j.core.object.entity.PartialSticker
-
- discord4j.core.object.entity.Sticker
-
- discord4j.core.object.entity.GuildSticker
-
- All Implemented Interfaces:
DiscordObject
,Entity
public final class GuildSticker extends Sticker
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class discord4j.core.object.entity.Sticker
Sticker.Format, Sticker.Type
-
-
Field Summary
-
Fields inherited from class discord4j.core.object.entity.PartialSticker
gateway
-
-
Constructor Summary
Constructors Constructor Description GuildSticker(GatewayDiscordClient gateway, discord4j.discordjson.json.StickerData data)
GuildSticker(GatewayDiscordClient gateway, discord4j.discordjson.json.StickerData data, long guildId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Mono<Void>
delete()
Requests to delete this sticker.Mono<Void>
delete(String reason)
Requests to delete this sticker while optionally specifying a reason.discord4j.core.spec.GuildStickerEditMono
edit()
Requests to edit this guild sticker.Mono<GuildSticker>
edit(discord4j.core.spec.GuildStickerEditSpec spec)
Requests to edit this guild sticker.Mono<Guild>
getGuild()
Requests to retrieve the guild this user is associated to.Mono<Guild>
getGuild(EntityRetrievalStrategy retrievalStrategy)
Requests to retrieve the guild this user is associated to, using the given retrieval strategy.Snowflake
getGuildId()
Gets the ID of the guild this user is associated to.-
Methods inherited from class discord4j.core.object.entity.Sticker
getData, getDescription, getPackId, getTags, getType, isAvailable
-
Methods inherited from class discord4j.core.object.entity.PartialSticker
getClient, getFormatType, getId, getImageUrl, getName, getStickerData
-
-
-
-
Constructor Detail
-
GuildSticker
public GuildSticker(GatewayDiscordClient gateway, discord4j.discordjson.json.StickerData data)
-
GuildSticker
public GuildSticker(GatewayDiscordClient gateway, discord4j.discordjson.json.StickerData data, long guildId)
-
-
Method Detail
-
getGuildId
public Snowflake getGuildId()
Gets the ID of the guild this user is associated to.- Returns:
- The ID of the guild this user is associated to.
-
getGuild
public Mono<Guild> getGuild(EntityRetrievalStrategy retrievalStrategy)
Requests to retrieve the guild this user is associated to, using the given retrieval strategy.
-
edit
public discord4j.core.spec.GuildStickerEditMono edit()
Requests to edit this guild sticker. Properties specifying how to edit this sticker can be set via thewithXxx
methods of the returnedGuildStickerEditMono
.- Returns:
- A
GuildStickerEditMono
where, upon successful completion, emits the editedGuildSticker
. If an error is received, it is emitted through theGuildStickerEditMono
.
-
edit
public Mono<GuildSticker> edit(discord4j.core.spec.GuildStickerEditSpec spec)
Requests to edit this guild sticker.- Parameters:
spec
- an immutable object that specifies how to edit this sticker- Returns:
- A
Mono
where, upon successful completion, emits the editedGuildSticker
. If an error is received, it is emitted through theMono
.
-
delete
public Mono<Void> delete()
Requests to delete this sticker.- Returns:
- A
Mono
where, upon successful completion, emits nothing; indicating the sticker has been deleted. If an error is received, it is emitted through theMono
.
-
delete
public Mono<Void> delete(@Nullable String reason)
Requests to delete this sticker while optionally specifying a reason.- Parameters:
reason
- The reason, if present.- Returns:
- A
Mono
where, upon successful completion, emits nothing; indicating the sticker has been deleted. If an error is received, it is emitted through theMono
.
-
-