Class GatewayDiscordClient
- All Implemented Interfaces:
EntityRetriever
GatewayBootstrap
and therefore
tracks state updates from all connected shards.
The following are some resources available through this aggregate:
- Access to the base
DiscordClient
for direct REST API operations throughrest()
. - Access to
CoreResources
like theRestClient
used to perform API requests. - Access to
GatewayResources
that configure Gateway stores, actions and coordination among shards. - Access to
EventDispatcher
publishing events from all participating shards.
-
Constructor Summary
ConstructorsConstructorDescriptionGatewayDiscordClient
(DiscordClient discordClient, GatewayResources gatewayResources, Mono<Void> onDisconnect, GatewayClientGroup gatewayClientGroup, VoiceConnectionFactory voiceConnectionFactory, EntityRetrievalStrategy entityRetrievalStrategy, Set<String> completingChunkNonces) -
Method Summary
Modifier and TypeMethodDescriptioncreateGuild
(discord4j.core.spec.GuildCreateSpec spec) Requests to create a guild.discord4j.core.spec.GuildCreateMono
createGuild
(String name, Region region) Requests to create a guild.createGuild
(Consumer<? super LegacyGuildCreateSpec> spec) Deprecated.discord4j.core.spec.UserEditMono
edit()
Requests to edit this client (i.e., modify the current bot user).edit
(discord4j.core.spec.UserEditSpec spec) Requests to edit this client (i.e., modify the current bot user).edit
(Consumer<? super LegacyUserEditSpec> spec) Deprecated.useedit(UserEditSpec)
oredit()
which offer an immutable approach to build specsRequests to retrieve the application info.getChannelById
(Snowflake channelId) Requests to retrieve the channel represented by the supplied ID.Returns the set of resources essential to operate on aDiscordClient
for entity manipulation, scheduling and API communication, like theRestClient
,JacksonResources
andReactorResources
.Distributes events to subscribers.getGatewayClient
(int shardId) Returns aGatewayClient
instance created by thisGatewayDiscordClient
, which is associated to a given shard index.Returns theGatewayClientGroup
capable of performing operations across allGatewayClient
instances created or managed by thisGatewayDiscordClient
.Returns the set of resources essential to buildGatewayClient
instances and manage multiple Discord Gateway connections.getGuildAutoModRules
(Snowflake guildId) Requests to retrieve the guild's automod rules.getGuildById
(Snowflake guildId) Requests to retrieve the guild represented by the supplied ID.getGuildChannels
(Snowflake guildId) Requests to retrieve the guild's channels.getGuildEmojiById
(Snowflake guildId, Snowflake emojiId) Requests to retrieve the guild emoji represented by the supplied IDs.getGuildEmojis
(Snowflake guildId) Requests to retrieve the guild's emojis.getGuildMembers
(Snowflake guildId) Requests to retrieve the guild's members.getGuildRoles
(Snowflake guildId) Requests to retrieve the guild's roles.Requests to retrieve the guilds the current client is in.getGuildStickerById
(Snowflake guildId, Snowflake stickerId) Requests to retrieve the guild sticker represented by the supplied IDs.getGuildStickers
(Snowflake guildId) Requests to retrieve the guild's stickers.Requests to retrieve an invite.getInvite
(String inviteCode, boolean withCounts, boolean withExpiration, Snowflake guildScheduledEventId) Requests to retrieve an invite.getMemberById
(Snowflake guildId, Snowflake userId) Requests to retrieve the member represented by the supplied IDs.getMessageById
(Snowflake channelId, Snowflake messageId) Requests to retrieve the message represented by the supplied IDs.Requests to retrieve the voice regions that are available.Returns theRestClient
used to execute REST API requests.getRoleById
(Snowflake guildId, Snowflake roleId) Requests to retrieve the role represented by the supplied IDs.getSelf()
Requests to retrieve the bot user.Gets the bot user's ID.getSelfMember
(Snowflake guildId) Requests to retrieve the bot user represented as amember
of the guild with the supplied ID.getStageInstanceByChannelId
(Snowflake channelId) Requests to retrieve aStageInstance
.getStageInstanceByChannelId
(Snowflake channelId, EntityRetrievalStrategy retrievalStrategy) Requests to retrieve aStageInstance
.getTemplateByCode
(String templateCode) Requests to retrieve the template represented by the supplied code.getThreadMemberById
(Snowflake threadId, Snowflake userId) Requests to retrieve the thread member associated to the supplied thread ID and user ID.getThreadMembers
(Snowflake threadId) Requests to retrieve the thread's members.getUserById
(Snowflake userId) Requests to retrieve the user represented by the supplied ID.getUsers()
Retrieve the currently stored (cached) users.Returns theVoiceConnectionFactory
instance created by thisGatewayDiscordClient
.Return theVoiceConnectionRegistry
for thisGatewayDiscordClient
.getWebhookById
(Snowflake webhookId) Requests to retrieve the webhook represented by the supplied ID.getWebhookByIdWithToken
(Snowflake webhookId, String token) Requests to retrieve the webhook represented by the supplied ID and token.joinStageAudience
(Snowflake guildId) Move theMember
represented by thisGatewayDiscordClient
to the stage audience.joinStageSpeakers
(Snowflake guildId) Move theMember
represented by thisGatewayDiscordClient
to the stage speakers.logout()
Disconnects thisGatewayDiscordClient
from Discord upon subscribing.on
(ReactiveEventAdapter adapter) Applies a givenadapter
to all events from this dispatcher.Return aMono
that signals completion when allGatewayClient
instances in this shard group have disconnected.Flux<discord4j.discordjson.json.gateway.GuildMembersChunk>
requestMemberChunks
(discord4j.discordjson.json.gateway.RequestGuildMembers request) Submit aRequestGuildMembers
payload using the current Gateway connection and wait for its completion, delivering rawGuildMembersChunk
elements asynchronously through aFlux
.requestMembers
(Snowflake guildId) requestMembers
(Snowflake guildId, Set<Snowflake> userIds) requestMembers
(discord4j.discordjson.json.gateway.RequestGuildMembers request) rest()
Access the parentDiscordClient
capable of performing direct REST API requests and REST entities.updatePresence
(ClientPresence clientPresence) Update the bot'sClientPresence
(client status) for every shard in this shard group.updatePresence
(ClientPresence clientPresence, int shardId) Update the bot'sPresence
(status) for the given shard index, provided it belongs in this shard group.withRetrievalStrategy
(EntityRetrievalStrategy retrievalStrategy) Applies the given strategy to retrieve entities using thisGatewayDiscordClient
.
-
Constructor Details
-
GatewayDiscordClient
public GatewayDiscordClient(DiscordClient discordClient, GatewayResources gatewayResources, Mono<Void> onDisconnect, GatewayClientGroup gatewayClientGroup, VoiceConnectionFactory voiceConnectionFactory, EntityRetrievalStrategy entityRetrievalStrategy, Set<String> completingChunkNonces)
-
-
Method Details
-
rest
Access the parentDiscordClient
capable of performing direct REST API requests and REST entities.- Returns:
- the
DiscordClient
that created thisGatewayDiscordClient
-
getCoreResources
Returns the set of resources essential to operate on aDiscordClient
for entity manipulation, scheduling and API communication, like theRestClient
,JacksonResources
andReactorResources
.- Returns:
- the
RestResources
for the parentDiscordClient
-
getGatewayResources
Returns the set of resources essential to buildGatewayClient
instances and manage multiple Discord Gateway connections.- Returns:
- the
GatewayResources
tied to thisGatewayDiscordClient
-
getEventDispatcher
Distributes events to subscribers. Starting from v3.1, theEventDispatcher
is capable of distributing events from allGatewayClient
connections (shards) that were specified when thisGatewayDiscordClient
was created.- Returns:
- the
EventDispatcher
tied to thisGatewayDiscordClient
-
getGatewayClient
Returns aGatewayClient
instance created by thisGatewayDiscordClient
, which is associated to a given shard index.- Parameters:
shardId
- the shard index used to get the client instance- Returns:
- a
GatewayClient
instance represented by the given shard, if present
-
getGatewayClientGroup
Returns theGatewayClientGroup
capable of performing operations across allGatewayClient
instances created or managed by thisGatewayDiscordClient
.- Returns:
- a
GatewayClientGroup
to aggregate gateway operations
-
getVoiceConnectionFactory
Returns theVoiceConnectionFactory
instance created by thisGatewayDiscordClient
.- Returns:
- a
VoiceConnectionFactory
instance capable of initiating voice connections
-
getVoiceConnectionRegistry
Return theVoiceConnectionRegistry
for thisGatewayDiscordClient
. This allows you to retrieve currently registeredVoiceConnection
instances.- Returns:
- a
VoiceConnectionRegistry
for voice connections
-
getRestClient
Returns theRestClient
used to execute REST API requests.- Returns:
- the
RestClient
tied to this Gateway client.
-
getWebhookById
Requests to retrieve the webhook represented by the supplied ID. The bot must have the MANAGE_WEBHOOKS permission in the webhook's channel. -
getWebhookByIdWithToken
Requests to retrieve the webhook represented by the supplied ID and token. Doesn't return the user who created the webhook object. Doesn't require the bot to have the MANAGE_WEBHOOKS permission.- Parameters:
webhookId
- The ID of the webhook.token
- The authentication token of the webhook.- Returns:
- A
Mono
where, upon successful completion, emits theWebhook
as represented by the supplied ID without the user field and with the token field. If an error is received, it is emitted through theMono
.
-
getApplicationInfo
Requests to retrieve the application info.- Returns:
- A
Mono
where, upon successful completion, emits theapplication info
. If an error is received, it is emitted through theMono
.
-
getUsers
Retrieve the currently stored (cached) users. -
getRegions
Requests to retrieve the voice regions that are available. -
getTemplateByCode
Requests to retrieve the template represented by the supplied code.- Parameters:
templateCode
- The code of the template.- Returns:
- A
Mono
where, upon successful completion, emits theGuildTemplate
as represented by the supplied code. If an error is received, it is emitted through theMono
.
-
getSelfId
Gets the bot user's ID.- Returns:
- The bot user's ID.
-
createGuild
Deprecated.usecreateGuild(GuildCreateSpec)
orcreateGuild(String, Region)
which offer an immutable approach to build specsRequests to create a guild.- Parameters:
spec
- AConsumer
that provides a "blank"LegacyGuildCreateSpec
to be operated on.- Returns:
- A
Mono
where, upon successful completion, emits the createdGuild
. If an error is received, it is emitted through theMono
.
-
createGuild
Requests to create a guild. Properties specifying how to create the guild can be set via thewithXxx
methods of the returnedGuildCreateMono
.- Parameters:
name
- the name of the guild to createregion
- the region of the guild to create- Returns:
- A
GuildCreateMono
where, upon successful completion, emits the createdGuild
. If an error is received, it is emitted through theGuildCreateMono
.
-
createGuild
Requests to create a guild. -
updatePresence
Update the bot'sClientPresence
(client status) for every shard in this shard group.- Parameters:
clientPresence
- The updated client status.- Returns:
- A
Mono
that signals completion upon successful update. If an error is received, it is emitted through theMono
.
-
updatePresence
Update the bot'sPresence
(status) for the given shard index, provided it belongs in this shard group.- Parameters:
clientPresence
- The updated client presence.- Returns:
- A
Mono
that signals completion upon successful update. If an error is received, it is emitted through theMono
.
-
getInvite
Requests to retrieve an invite. -
getInvite
public Mono<Invite> getInvite(String inviteCode, boolean withCounts, boolean withExpiration, @Nullable Snowflake guildScheduledEventId) Requests to retrieve an invite.- Parameters:
inviteCode
- the code for the invite (e.g. "xdYkpp").withCounts
- whether the invite should contain approximate member countswithExpiration
- whether the invite should contain the expiration dateguildScheduledEventId
- the guild scheduled event to include with the invite, can benull
- Returns:
- A
Mono
where, upon successful completion, emits theInvite
as represented by the supplied invite code. If an error is received, it is emitted through theMono
.
-
edit
Deprecated.useedit(UserEditSpec)
oredit()
which offer an immutable approach to build specsRequests to edit this client (i.e., modify the current bot user).- Parameters:
spec
- AConsumer
that provides a "blank"LegacyUserEditSpec
to be operated on.- Returns:
- A
Mono
where, upon successful completion, emits the editedUser
. If an error is received, it is emitted through theMono
.
-
edit
public discord4j.core.spec.UserEditMono edit()Requests to edit this client (i.e., modify the current bot user). Properties specifying how to edit this client can be set via thewithXxx
methods of the returnedUserEditMono
. -
edit
Requests to edit this client (i.e., modify the current bot user). -
getStageInstanceByChannelId
public Mono<StageInstance> getStageInstanceByChannelId(Snowflake channelId, EntityRetrievalStrategy retrievalStrategy) Requests to retrieve aStageInstance
.- Parameters:
channelId
- The channel ID associated to theStageInstance
.retrievalStrategy
- The retreival strategy to use- Returns:
- A
Mono
where, upon successful completion, emits theStageInstance
associated to the supplied channel ID. If an error is received, it is emitted through theMono
.
-
getStageInstanceByChannelId
Requests to retrieve aStageInstance
.- Specified by:
getStageInstanceByChannelId
in interfaceEntityRetriever
- Parameters:
channelId
- The channel ID associated to theStageInstance
.- Returns:
- A
Mono
where, upon successful completion, emits theStageInstance
associated to the supplied channel ID. If an error is received, it is emitted through theMono
.
-
joinStageSpeakers
Move theMember
represented by thisGatewayDiscordClient
to the stage speakers. Requires theMember
to be connected to aStageChannel
- Returns:
- A
Mono
that upon subscription, will move theMember
represented by thisGatewayDiscordClient
to the stage speakers.
-
joinStageAudience
Move theMember
represented by thisGatewayDiscordClient
to the stage audience. Requires theMember
to be connected to aStageChannel
- Returns:
- A
Mono
that upon subscription, will move theMember
represented by thisGatewayDiscordClient
to the stage audience.
-
logout
Disconnects thisGatewayDiscordClient
from Discord upon subscribing. AllGatewayClient
instances in this shard group will attempt to close their current Gateway session and complete thisMono
after all of them have disconnected.- Returns:
- A
Mono
that upon subscription, will disconnect each Gateway connection established by thisGatewayDiscordClient
and complete after all of them have closed.
-
onDisconnect
Return aMono
that signals completion when allGatewayClient
instances in this shard group have disconnected.- Returns:
- a
Mono
that will complete once allGatewayClient
instances in this shard group have disconnected.
-
on
Retrieves aFlux
with elements of the givenEvent
type. ThisFlux
has to be subscribed to in order to start processing. SeeEvent
class for the list of possible event classes.Note: Errors occurring while processing events will terminate your sequence. If you wish to use a version capable of handling errors for you, use
on(Class, Function)
. See Reactive Streams Spec explaining this behavior.A recommended pattern to use this method is wrapping your code that may throw exceptions within a
flatMap
block and useMono.onErrorResume(Function)
,Flux.onErrorResume(Function)
or equivalent methods to maintain the sequence active:client.on(MessageCreateEvent.class) .flatMap(event -> myCodeThatMightThrow(event) .onErrorResume(error -> { // log and then discard the error to keep the sequence alive log.error("Failed to handle event!", error); return Mono.empty(); })) .subscribe();
For more alternatives to handling errors, please see Error Handling docs page.
- Type Parameters:
E
- the type of the event class- Parameters:
eventClass
- the event class to obtain events from- Returns:
- a new
Flux
with the requested events
-
on
Retrieves aFlux
with elements of the givenEvent
type, to be processed through a givenFunction
upon subscription. Errors occurring within the mapper will be logged and discarded, preventing the termination of the "infinite" event sequence. SeeEvent
class for the list of possible event classes.There are multiple ways of using this event handling method, for example:
client.on(MessageCreateEvent.class, event -> { // myCodeThatMightThrow should return a Reactor type (Mono or Flux) return myCodeThatMightThrow(event); }) .subscribe(); client.on(MessageCreateEvent.class, event -> { // myCodeThatMightThrow *can* be blocking, so wrap it in a Reactor type return Mono.fromRunnable(() -> myCodeThatMightThrow(event)); }) .subscribe();
Continuing the chain after
on(class, event -> ...)
will require your own error handling strategy. Check the docs foron(Class)
for more details.- Type Parameters:
E
- the type of the event classT
- the type of the event mapper function- Parameters:
eventClass
- the event class to obtain events frommapper
- an event mapping function called on each event. If you do not wish to perform further operations you can returnMono.empty()
.- Returns:
- a new
Flux
with the type resulting from the given event mapper
-
on
Applies a givenadapter
to all events from this dispatcher. Errors occurring within the mapper will be logged and discarded, preventing the termination of the "infinite" event sequence. This variant allows you to have a single subscriber to this dispatcher, which is useful to collect all startup events.A standard approach to this method is to subclass
ReactiveEventAdapter
, overriding the methods you want to listen for:client.on(new ReactiveEventAdapter() { public Publisher<?> onReady(ReadyEvent event) { return Mono.fromRunnable(() -> System.out.println("Connected as " + event.getSelf().getTag())); } public Publisher<?> onMessageCreate(MessageCreateEvent event) { if (event.getMessage().getContent().equals("!ping")) { return event.getMessage().getChannel() .flatMap(channel -> channel.createMessage("Pong!")); } return Mono.empty(); } }).subscribe(); // nothing happens until you subscribe
Each method requires a
Publisher
return likeMono
orFlux
and all errors will be logged and discarded. To use a synchronous implementation you can wrap your code withMono.fromRunnable(Runnable)
.Continuing the chain will require your own error handling strategy. Check the docs for
on(Class)
for more details.- Parameters:
adapter
- an adapter meant to be subclassed with its appropriate methods overridden- Returns:
- a new
Flux
with the type resulting from the given event mapper
-
requestMembers
Return allmembers
from the givenguildId
using the current Gateway connection. This method performs a check to validate whether the given guild's data can be obtained from thisGatewayDiscordClient
. -
requestMembers
Return a set ofmembers
from the givenguildId
using the current Gateway connection. This method performs a check to validate whether the given guild's data can be obtained from thisGatewayDiscordClient
. -
requestMembers
Submit aRequestGuildMembers
payload using the current Gateway connection and wait for its completion, deliveringMember
elements asynchronously through aFlux
. This method performs a check to validate whether the given guild's data can be obtained from thisGatewayDiscordClient
. -
requestMemberChunks
public Flux<discord4j.discordjson.json.gateway.GuildMembersChunk> requestMemberChunks(discord4j.discordjson.json.gateway.RequestGuildMembers request) Submit aRequestGuildMembers
payload using the current Gateway connection and wait for its completion, delivering rawGuildMembersChunk
elements asynchronously through aFlux
. This method performs a check to validate whether the given guild's data can be obtained from thisGatewayDiscordClient
.A timeout given by is used to fail this request if the operation is unable to complete due to disallowed or disabled members intent. This is particularly relevant when requesting a complete member list. If the timeout is triggered, a
TimeoutException
is forwarded through theFlux
.- Parameters:
request
- the member request to submit. Create one usingRequestGuildMembers.builder()
.Flux.timeout(Duration)
- Returns:
- a
Flux
ofGuildMembersChunk
for the givenGuild
. If an error occurs, it is emitted through theFlux
.
-
withRetrievalStrategy
Applies the given strategy to retrieve entities using thisGatewayDiscordClient
.- Parameters:
retrievalStrategy
- the strategy to apply- Returns:
- an EntityRetriever able to retrieve entities using the given strategy
-
getChannelById
Description copied from interface:EntityRetriever
Requests to retrieve the channel represented by the supplied ID.- Specified by:
getChannelById
in interfaceEntityRetriever
- Parameters:
channelId
- The ID of the channel.- Returns:
- A
Mono
where, upon successful completion, emits theChannel
as represented by the supplied ID. If an error is received, it is emitted through theMono
.
-
getGuildById
Description copied from interface:EntityRetriever
Requests to retrieve the guild represented by the supplied ID.- Specified by:
getGuildById
in interfaceEntityRetriever
- Parameters:
guildId
- The ID of the guild.- Returns:
- A
Mono
where, upon successful completion, emits theGuild
as represented by the supplied ID. If an error is received, it is emitted through theMono
.
-
getGuildStickerById
Description copied from interface:EntityRetriever
Requests to retrieve the guild sticker represented by the supplied IDs.- Specified by:
getGuildStickerById
in interfaceEntityRetriever
- Parameters:
guildId
- The ID of the guild.stickerId
- The ID of the sticker.- Returns:
- A
Mono
where, upon successful completion, emits theGuildSticker
as represented by the supplied IDs. If an error is received, it is emitted through theMono
.
-
getGuildEmojiById
Description copied from interface:EntityRetriever
Requests to retrieve the guild emoji represented by the supplied IDs.- Specified by:
getGuildEmojiById
in interfaceEntityRetriever
- Parameters:
guildId
- The ID of the guild.emojiId
- The ID of the emoji.- Returns:
- A
Mono
where, upon successful completion, emits theGuildEmoji
as represented by the supplied IDs. If an error is received, it is emitted through theMono
.
-
getMemberById
Description copied from interface:EntityRetriever
Requests to retrieve the member represented by the supplied IDs. Depending on the implementation, it is possible to lazily request member entities from the Gateway, or the REST API.- Specified by:
getMemberById
in interfaceEntityRetriever
- Parameters:
guildId
- The ID of the guild.userId
- The ID of the user.- Returns:
- A
Mono
where, upon successful completion, emits theMember
as represented by the supplied IDs. If an error is received, it is emitted through theMono
.
-
getMessageById
Description copied from interface:EntityRetriever
Requests to retrieve the message represented by the supplied IDs.- Specified by:
getMessageById
in interfaceEntityRetriever
- Parameters:
channelId
- The ID of the channel.messageId
- The ID of the message.- Returns:
- A
Mono
where, upon successful completion, emits theMessage
as represented by the supplied IDs. If an error is received, it is emitted through theMono
.
-
getRoleById
Description copied from interface:EntityRetriever
Requests to retrieve the role represented by the supplied IDs.- Specified by:
getRoleById
in interfaceEntityRetriever
- Parameters:
guildId
- The ID of the guild.roleId
- The ID of the role.- Returns:
- A
Mono
where, upon successful completion, emits theRole
as represented by the supplied IDs. If an error is received, it is emitted through theMono
.
-
getUserById
Description copied from interface:EntityRetriever
Requests to retrieve the user represented by the supplied ID.- Specified by:
getUserById
in interfaceEntityRetriever
- Parameters:
userId
- The ID of the user.- Returns:
- A
Mono
where, upon successful completion, emits theUser
as represented by the supplied ID. If an error is received, it is emitted through theMono
.
-
getGuilds
Description copied from interface:EntityRetriever
Requests to retrieve the guilds the current client is in.- Specified by:
getGuilds
in interfaceEntityRetriever
- Returns:
- A
Flux
that continually emits theguilds
that the current client is in. If an error is received, it is emitted through theFlux
.
-
getSelf
Description copied from interface:EntityRetriever
Requests to retrieve the bot user.- Specified by:
getSelf
in interfaceEntityRetriever
- Returns:
- A
Mono
where, upon successful completion, emits the botuser
. If an error is received, it is emitted through theMono
.
-
getSelfMember
Description copied from interface:EntityRetriever
Requests to retrieve the bot user represented as amember
of the guild with the supplied ID.- Specified by:
getSelfMember
in interfaceEntityRetriever
- Parameters:
guildId
- The ID of the guild.- Returns:
- A
Mono
where, upon successful completion, emits the botmember
. If an error is received, it is emitted through theMono
.
-
getGuildMembers
Description copied from interface:EntityRetriever
Requests to retrieve the guild's members.- Specified by:
getGuildMembers
in interfaceEntityRetriever
- Parameters:
guildId
- the ID of the guild.- Returns:
- A
Flux
that continually emits themembers
of the guild. If an error is received, it is emitted through theFlux
.
-
getGuildChannels
Description copied from interface:EntityRetriever
Requests to retrieve the guild's channels.The order of items emitted by the returned
Flux
is unspecified. UseOrderUtil.orderGuildChannels(Flux)
to consistently order channels.- Specified by:
getGuildChannels
in interfaceEntityRetriever
- Parameters:
guildId
- the ID of the guild.- Returns:
- A
Flux
that continually emits the guild'schannels
. If an error is received, it is emitted through theFlux
.
-
getGuildRoles
Description copied from interface:EntityRetriever
Requests to retrieve the guild's roles.The order of items emitted by the returned
Flux
is unspecified. UseOrderUtil.orderRoles(Flux)
to consistently order roles.- Specified by:
getGuildRoles
in interfaceEntityRetriever
- Parameters:
guildId
- The ID of the guild.- Returns:
- A
Flux
that continually emits the guild'sroles
. If an error is received, it is emitted through theFlux
.
-
getGuildEmojis
Description copied from interface:EntityRetriever
Requests to retrieve the guild's emojis.- Specified by:
getGuildEmojis
in interfaceEntityRetriever
- Parameters:
guildId
- The ID of the guild.- Returns:
- A
Flux
that continually emits the guild'semojis
. If an error is received, it is emitted through theFlux
.
-
getGuildStickers
Description copied from interface:EntityRetriever
Requests to retrieve the guild's stickers.- Specified by:
getGuildStickers
in interfaceEntityRetriever
- Parameters:
guildId
- The ID of the guild.- Returns:
- A
Flux
that continually emits the guild'sstickers
. If an error is received, it is emitted through theFlux
.
-
getThreadMemberById
Description copied from interface:EntityRetriever
Requests to retrieve the thread member associated to the supplied thread ID and user ID.- Specified by:
getThreadMemberById
in interfaceEntityRetriever
- Parameters:
threadId
- The ID of the thread.userId
- The ID of the user.- Returns:
- A
Mono
where, upon successful completion, emits theThreadMember
associated to the supplied thread ID and user ID. If an error is received, it is emitted through theMono
.
-
getThreadMembers
Description copied from interface:EntityRetriever
Requests to retrieve the thread's members.- Specified by:
getThreadMembers
in interfaceEntityRetriever
- Parameters:
threadId
- The ID of the thread.- Returns:
- A
Flux
that continually emits the thread'smembers
. If an error is received, it is emitted through theFlux
.
-
getGuildAutoModRules
Description copied from interface:EntityRetriever
Requests to retrieve the guild's automod rules.- Specified by:
getGuildAutoModRules
in interfaceEntityRetriever
- Returns:
- A
Flux
that continually emits the guild'sAutoModRule
. If an error is received, it is emitted through theFlux
.
-
createGuild(GuildCreateSpec)
orcreateGuild(String, Region)
which offer an immutable approach to build specs