Package discord4j.core.retriever
Interface EntityRetriever
- All Known Implementing Classes:
FallbackEntityRetriever
,GatewayDiscordClient
,RestEntityRetriever
,StoreEntityRetriever
public interface EntityRetriever
Abstraction for entity retrieval.
-
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.
-
Method Details
-
getChannelById
Requests to retrieve the channel represented by the supplied ID. -
getGuildById
Requests to retrieve the guild represented by the supplied ID. -
getGuildStickerById
Requests to retrieve the guild sticker represented by the supplied IDs.- 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
Requests to retrieve the guild emoji represented by the supplied IDs.- 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
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. -
getMessageById
Requests to retrieve the message represented by the supplied IDs. -
getRoleById
Requests to retrieve the role represented by the supplied IDs. -
getUserById
Requests to retrieve the user represented by the supplied ID. -
getGuilds
Requests to retrieve the guilds the current client is in. -
getSelf
Requests to retrieve the bot user. -
getSelfMember
Requests to retrieve the bot user represented as amember
of the guild with the supplied ID. -
getGuildMembers
Requests to retrieve the guild's members. -
getGuildChannels
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. -
getGuildRoles
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. -
getGuildEmojis
Requests to retrieve the guild's emojis. -
getStageInstanceByChannelId
Requests to retrieve the stage instance associated to the supplied channel ID.- 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
.
-
getGuildStickers
Requests to retrieve the guild's stickers. -
getThreadMemberById
Requests to retrieve the thread member associated to the supplied thread ID and user ID.- 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
Requests to retrieve the thread's members. -
getGuildAutoModRules
Requests to retrieve the guild's automod rules.- Returns:
- A
Flux
that continually emits the guild'sAutoModRule
. If an error is received, it is emitted through theFlux
.
-
getScheduledEventById
Requests to retrieve theScheduledEvent
represented by the supplied IDs.- 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
Requests to retrieve the guild's scheduled events. -
getScheduledEventUsers
Requests to retrieve the users that subscribed to the event represented by the supplied IDs.
-