Package discord4j.core.retriever
Interface EntityRetriever
-
- All Known Implementing Classes:
FallbackEntityRetriever
,GatewayDiscordClient
,RestEntityRetriever
,StoreEntityRetriever
public interface EntityRetriever
Abstraction for entity retrieval.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Mono<Channel>
getChannelById(Snowflake channelId)
Requests to retrieve the channel represented by the supplied ID.Flux<AutoModRule>
getGuildAutoModRules(Snowflake guildId)
Requests to retrieve the guild's automod rules.Mono<Guild>
getGuildById(Snowflake guildId)
Requests to retrieve the guild represented by the supplied ID.Flux<GuildChannel>
getGuildChannels(Snowflake guildId)
Requests to retrieve the guild's channels.Mono<GuildEmoji>
getGuildEmojiById(Snowflake guildId, Snowflake emojiId)
Requests to retrieve the guild emoji represented by the supplied IDs.Flux<GuildEmoji>
getGuildEmojis(Snowflake guildId)
Requests to retrieve the guild's emojis.Flux<Member>
getGuildMembers(Snowflake guildId)
Requests to retrieve the guild's members.Flux<Role>
getGuildRoles(Snowflake guildId)
Requests to retrieve the guild's roles.Flux<Guild>
getGuilds()
Requests to retrieve the guilds the current client is in.Mono<GuildSticker>
getGuildStickerById(Snowflake guildId, Snowflake stickerId)
Requests to retrieve the guild sticker represented by the supplied IDs.Flux<GuildSticker>
getGuildStickers(Snowflake guildId)
Requests to retrieve the guild's stickers.Mono<Member>
getMemberById(Snowflake guildId, Snowflake userId)
Requests to retrieve the member represented by the supplied IDs.Mono<Message>
getMessageById(Snowflake channelId, Snowflake messageId)
Requests to retrieve the message represented by the supplied IDs.Mono<Role>
getRoleById(Snowflake guildId, Snowflake roleId)
Requests to retrieve the role represented by the supplied IDs.Mono<ScheduledEvent>
getScheduledEventById(Snowflake guildId, Snowflake eventId)
Requests to retrieve theScheduledEvent
represented by the supplied IDs.Flux<ScheduledEvent>
getScheduledEvents(Snowflake guildId)
Requests to retrieve the guild's scheduled events.Flux<ScheduledEventUser>
getScheduledEventUsers(Snowflake guildId, Snowflake eventId)
Requests to retrieve the users that subscribed to the event represented by the supplied IDs.Mono<User>
getSelf()
Requests to retrieve the bot user.Mono<Member>
getSelfMember(Snowflake guildId)
Requests to retrieve the bot user represented as amember
of the guild with the supplied ID.Mono<User>
getUserById(Snowflake userId)
Requests to retrieve the user represented by the supplied ID.
-
-
-
Method Detail
-
getChannelById
Mono<Channel> getChannelById(Snowflake channelId)
Requests to retrieve the channel represented by the supplied ID.
-
getGuildById
Mono<Guild> getGuildById(Snowflake guildId)
Requests to retrieve the guild represented by the supplied ID.
-
getGuildStickerById
Mono<GuildSticker> getGuildStickerById(Snowflake guildId, Snowflake stickerId)
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
Mono<GuildEmoji> getGuildEmojiById(Snowflake guildId, Snowflake emojiId)
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
Mono<Member> getMemberById(Snowflake guildId, Snowflake userId)
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
Mono<Message> getMessageById(Snowflake channelId, Snowflake messageId)
Requests to retrieve the message represented by the supplied IDs.
-
getRoleById
Mono<Role> getRoleById(Snowflake guildId, Snowflake roleId)
Requests to retrieve the role represented by the supplied IDs.
-
getUserById
Mono<User> getUserById(Snowflake userId)
Requests to retrieve the user represented by the supplied ID.
-
getSelfMember
Mono<Member> getSelfMember(Snowflake guildId)
Requests to retrieve the bot user represented as amember
of the guild with the supplied ID.
-
getGuildMembers
Flux<Member> getGuildMembers(Snowflake guildId)
Requests to retrieve the guild's members.
-
getGuildChannels
Flux<GuildChannel> getGuildChannels(Snowflake guildId)
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
Flux<Role> getGuildRoles(Snowflake guildId)
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
Flux<GuildEmoji> getGuildEmojis(Snowflake guildId)
Requests to retrieve the guild's emojis.
-
getGuildStickers
Flux<GuildSticker> getGuildStickers(Snowflake guildId)
Requests to retrieve the guild's stickers.
-
getGuildAutoModRules
Flux<AutoModRule> getGuildAutoModRules(Snowflake guildId)
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
Mono<ScheduledEvent> getScheduledEventById(Snowflake guildId, Snowflake eventId)
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
Flux<ScheduledEvent> getScheduledEvents(Snowflake guildId)
Requests to retrieve the guild's scheduled events.
-
getScheduledEventUsers
Flux<ScheduledEventUser> getScheduledEventUsers(Snowflake guildId, Snowflake eventId)
Requests to retrieve the users that subscribed to the event represented by the supplied IDs.
-
-