Package discord4j.core.retriever
Class RestEntityRetriever
java.lang.Object
discord4j.core.retriever.RestEntityRetriever
- All Implemented Interfaces:
EntityRetriever
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetChannelById
(Snowflake channelId) Requests to retrieve the channel represented by the supplied ID.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.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.getRoleById
(Snowflake guildId, Snowflake roleId) Requests to retrieve the role represented by the supplied IDs.getScheduledEventById
(Snowflake guildId, Snowflake eventId) Requests to retrieve theScheduledEvent
represented by the supplied IDs.getScheduledEvents
(Snowflake guildId) Requests to retrieve the guild's scheduled events.getScheduledEventUsers
(Snowflake guildId, Snowflake eventId) Requests to retrieve the users that subscribed to the event represented by the supplied IDs.getSelf()
Requests to retrieve the bot user.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 the stage instance associated to the supplied channel ID.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.
-
Constructor Details
-
RestEntityRetriever
-
-
Method Details
-
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
.
-
getScheduledEventById
Description copied from interface:EntityRetriever
Requests to retrieve theScheduledEvent
represented by the supplied IDs.- Specified by:
getScheduledEventById
in interfaceEntityRetriever
- Parameters:
guildId
- The ID of the guild.eventId
- The ID of the scheduled event.- Returns:
- A
Mono
where, upon successful completion, emits theScheduledEvent
as represented by the supplied IDs. If an error is received, it is emitted through theMono
.
-
getScheduledEvents
Description copied from interface:EntityRetriever
Requests to retrieve the guild's scheduled events.- Specified by:
getScheduledEvents
in interfaceEntityRetriever
- Returns:
- A
Flux
that continually emits the guild'sevents
. If an error is received, it is emitted through theFlux
.
-
getScheduledEventUsers
Description copied from interface:EntityRetriever
Requests to retrieve the users that subscribed to the event represented by the supplied IDs.- Specified by:
getScheduledEventUsers
in interfaceEntityRetriever
- Returns:
- A
Flux
that continually emits the event'susers
. If an error is received, it is emitted through theFlux
.
-
getStageInstanceByChannelId
Description copied from interface:EntityRetriever
Requests to retrieve the stage instance associated to the supplied channel ID.- Specified by:
getStageInstanceByChannelId
in interfaceEntityRetriever
- Parameters:
channelId
- The ID of the channel.- 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
.
-