Interface DataAccessor
- All Known Implementing Classes:
LegacyStoreLayout
,LocalStoreLayout
public interface DataAccessor
Defines methods to handle read operations on a store.
-
Method Summary
Modifier and TypeMethodDescriptionCounts the number of channels present in the store.countChannelsInGuild
(long guildId) Counts the number of channels present in the store for the given guild ID.Counts the number of emojis present in the store.countEmojisInGuild
(long guildId) Counts the number of emojis present in the store for the given guild ID.countExactMembersInGuild
(long guildId) Counts the exact number of members for the given guild ID.Counts the number of guilds present in the store.Counts the number of members present in the store.countMembersInGuild
(long guildId) Counts the number of members present in the store for the given guild ID.Counts the number of messages present in the store.countMessagesInChannel
(long channelId) Counts the number of messages present in the store for the given channel ID.Counts the number of presences present in the store.countPresencesInGuild
(long guildId) Counts the number of presences present in the store for the given guild ID.Counts the number of roles present in the store.countRolesInGuild
(long guildId) Counts the number of roles present in the store for the given guild ID.Counts the number of stickers present in the store.countStickersInGuild
(long guildId) Counts the number of stickers present in the store for the given guild ID.Counts the number of users present in the store.Counts the number of voice states present in the store.countVoiceStatesInChannel
(long guildId, long channelId) Counts the number of voice states present in the store for the given channel ID.countVoiceStatesInGuild
(long guildId) Counts the number of voice states present in the store for the given guild ID.Mono<discord4j.discordjson.json.ChannelData>
getChannelById
(long channelId) Retrieves data for the channel corresponding to the given channel ID.Flux<discord4j.discordjson.json.ChannelData>
Retrieves data for all channels present in the store.Flux<discord4j.discordjson.json.ChannelData>
getChannelsInGuild
(long guildId) Retrieves data for all channels present in the store for the given guild ID.Mono<discord4j.discordjson.json.EmojiData>
getEmojiById
(long guildId, long emojiId) Retrieves data for the emoji corresponding to the given guild ID and emoji ID.Flux<discord4j.discordjson.json.EmojiData>
Retrieves data for all emojis present in the store.Flux<discord4j.discordjson.json.EmojiData>
getEmojisInGuild
(long guildId) Retrieves data for all emojis present in the store for the given guild ID.Flux<discord4j.discordjson.json.MemberData>
getExactMembersInGuild
(long guildId) Retrieves data for all members for the given guild ID.Mono<discord4j.discordjson.json.GuildData>
getGuildById
(long guildId) Retrieves data for the guild corresponding to the given guild ID.Flux<discord4j.discordjson.json.GuildData>
Retrieves data for all guilds present in the store.Mono<discord4j.discordjson.json.MemberData>
getMemberById
(long guildId, long userId) Retrieves data for the member corresponding to the given guild ID and user ID.Flux<discord4j.discordjson.json.MemberData>
Retrieves data for all members present in the store.Flux<discord4j.discordjson.json.MemberData>
getMembersInGuild
(long guildId) Retrieves data for all members present in the store for the given guild ID.default Flux<discord4j.discordjson.json.ThreadMemberData>
getMembersInThread
(long threadId) Retrieves data for all thread members present in the store for the given thread ID.Mono<discord4j.discordjson.json.MessageData>
getMessageById
(long channelId, long messageId) Retrieves data for the message corresponding to the given channel ID and message ID.Flux<discord4j.discordjson.json.MessageData>
Retrieves data for all messages present in the store.Flux<discord4j.discordjson.json.MessageData>
getMessagesInChannel
(long channelId) Retrieves data for all messages present in the store for the given channel ID.Mono<discord4j.discordjson.json.PresenceData>
getPresenceById
(long guildId, long userId) Retrieves data for the presence corresponding to the given guild ID and user ID.Flux<discord4j.discordjson.json.PresenceData>
Retrieves data for all presences present in the store.Flux<discord4j.discordjson.json.PresenceData>
getPresencesInGuild
(long guildId) Retrieves data for all presences present in the store for the given guild ID.Mono<discord4j.discordjson.json.RoleData>
getRoleById
(long guildId, long roleId) Retrieves data for the role corresponding to the given guild ID and role ID.Flux<discord4j.discordjson.json.RoleData>
getRoles()
Retrieves data for all roles present in the store.Flux<discord4j.discordjson.json.RoleData>
getRolesInGuild
(long guildId) Retrieves data for all roles present in the store for the given guild ID.Mono<discord4j.discordjson.json.StageInstanceData>
getStageInstanceByChannelId
(long channelId) Retrieves data for the stage instance corresponding to the given channel ID.Mono<discord4j.discordjson.json.StickerData>
getStickerById
(long guildId, long stickerId) Retrieves data for the sticker corresponding to the given guild ID and sticker ID.Flux<discord4j.discordjson.json.StickerData>
Retrieves data for all stickers present in the store.Flux<discord4j.discordjson.json.StickerData>
getStickersInGuild
(long guildId) Retrieves data for all stickers present in the store for the given guild ID.default Mono<discord4j.discordjson.json.ThreadMemberData>
getThreadMemberById
(long threadId, long userId) Retrieves data for the thread member corresponding to the given thread ID and user ID.Mono<discord4j.discordjson.json.UserData>
getUserById
(long userId) Retrieves data for the user corresponding to the given user ID.Flux<discord4j.discordjson.json.UserData>
getUsers()
Retrieves data for all users present in the store.Mono<discord4j.discordjson.json.VoiceStateData>
getVoiceStateById
(long guildId, long userId) Retrieves data for the voice state corresponding to the given guild ID and user ID.Flux<discord4j.discordjson.json.VoiceStateData>
Retrieves data for all voice states present in the store.Flux<discord4j.discordjson.json.VoiceStateData>
getVoiceStatesInChannel
(long guildId, long channelId) Retrieves data for all voice states present in the store for the given guild ID and channel ID.Flux<discord4j.discordjson.json.VoiceStateData>
getVoiceStatesInGuild
(long guildId) Retrieves data for all voice states present in the store for the given guild ID.
-
Method Details
-
countChannels
Counts the number of channels present in the store.- Returns:
- A
Mono
emitting the channel count
-
countChannelsInGuild
Counts the number of channels present in the store for the given guild ID.- Parameters:
guildId
- the guild ID- Returns:
- A
Mono
emitting the channel count
-
countStickers
Counts the number of stickers present in the store.- Returns:
- A
Mono
emitting the sticker count - Since:
- 3.2.3
-
countStickersInGuild
Counts the number of stickers present in the store for the given guild ID.- Parameters:
guildId
- the guild ID- Returns:
- A
Mono
emitting the sticker count - Since:
- 3.2.3
-
countEmojis
Counts the number of emojis present in the store.- Returns:
- A
Mono
emitting the emoji count
-
countEmojisInGuild
Counts the number of emojis present in the store for the given guild ID.- Parameters:
guildId
- the guild ID- Returns:
- A
Mono
emitting the emoji count
-
countGuilds
Counts the number of guilds present in the store.- Returns:
- A
Mono
emitting the guild count
-
countMembers
Counts the number of members present in the store.- Returns:
- A
Mono
emitting the member count
-
countMembersInGuild
Counts the number of members present in the store for the given guild ID.- Parameters:
guildId
- the guild ID- Returns:
- A
Mono
emitting the member count
-
countExactMembersInGuild
Counts the exact number of members for the given guild ID. If some members are not present in the store and thus is not able to return an accurate count, it will error withExactResultNotAvailableException
.- Parameters:
guildId
- the guild ID- Returns:
- A
Mono
emitting the member count
-
countMessages
Counts the number of messages present in the store.- Returns:
- A
Mono
emitting the message count
-
countMessagesInChannel
Counts the number of messages present in the store for the given channel ID.- Parameters:
channelId
- the channel ID- Returns:
- A
Mono
emitting the message count
-
countPresences
Counts the number of presences present in the store.- Returns:
- A
Mono
emitting the presence count
-
countPresencesInGuild
Counts the number of presences present in the store for the given guild ID.- Parameters:
guildId
- the guild ID- Returns:
- A
Mono
emitting the presence count
-
countRoles
Counts the number of roles present in the store.- Returns:
- A
Mono
emitting the role count
-
countRolesInGuild
Counts the number of roles present in the store for the given guild ID.- Parameters:
guildId
- the guild ID- Returns:
- A
Mono
emitting the role count
-
countUsers
Counts the number of users present in the store.- Returns:
- A
Mono
emitting the user count
-
countVoiceStates
Counts the number of voice states present in the store.- Returns:
- A
Mono
emitting the voice state count
-
countVoiceStatesInGuild
Counts the number of voice states present in the store for the given guild ID.- Parameters:
guildId
- the guild ID- Returns:
- A
Mono
emitting the voice state count
-
countVoiceStatesInChannel
Counts the number of voice states present in the store for the given channel ID.- Parameters:
guildId
- the guild IDchannelId
- the channel ID- Returns:
- A
Mono
emitting the voice state count
-
getChannels
Flux<discord4j.discordjson.json.ChannelData> getChannels()Retrieves data for all channels present in the store.- Returns:
- A
Flux
emitting the channels, or empty if none is present
-
getChannelsInGuild
Retrieves data for all channels present in the store for the given guild ID.- Parameters:
guildId
- the guild ID- Returns:
- A
Flux
emitting the channels, or empty if none is present
-
getChannelById
Retrieves data for the channel corresponding to the given channel ID.- Parameters:
channelId
- the channel ID- Returns:
- A
Mono
emitting the channel, or empty if not found
-
getStickers
Flux<discord4j.discordjson.json.StickerData> getStickers()Retrieves data for all stickers present in the store.- Returns:
- A
Flux
emitting the stickers, or empty if none is present - Since:
- 3.2.3
-
getStickersInGuild
Retrieves data for all stickers present in the store for the given guild ID.- Parameters:
guildId
- the guild ID- Returns:
- A
Flux
emitting the stickers, or empty if none is present - Since:
- 3.2.3
-
getStickerById
Retrieves data for the sticker corresponding to the given guild ID and sticker ID.- Parameters:
guildId
- the guild IDstickerId
- the sticker ID- Returns:
- A
Mono
emitting the sticker, or empty if not found - Since:
- 3.2.3
-
getEmojis
Flux<discord4j.discordjson.json.EmojiData> getEmojis()Retrieves data for all emojis present in the store.- Returns:
- A
Flux
emitting the emojis, or empty if none is present
-
getEmojisInGuild
Retrieves data for all emojis present in the store for the given guild ID.- Parameters:
guildId
- the guild ID- Returns:
- A
Flux
emitting the emojis, or empty if none is present
-
getEmojiById
Retrieves data for the emoji corresponding to the given guild ID and emoji ID.- Parameters:
guildId
- the guild IDemojiId
- the emoji ID- Returns:
- A
Mono
emitting the emoji, or empty if not found
-
getGuilds
Flux<discord4j.discordjson.json.GuildData> getGuilds()Retrieves data for all guilds present in the store.- Returns:
- A
Flux
emitting the guilds, or empty if none is present
-
getGuildById
Retrieves data for the guild corresponding to the given guild ID.- Parameters:
guildId
- the guild ID- Returns:
- A
Mono
emitting the guild, or empty if not found
-
getMembers
Flux<discord4j.discordjson.json.MemberData> getMembers()Retrieves data for all members present in the store.- Returns:
- A
Flux
emitting the members, or empty if none is present
-
getMembersInGuild
Retrieves data for all members present in the store for the given guild ID.- Parameters:
guildId
- the guild ID- Returns:
- A
Flux
emitting the members, or empty if none is present
-
getExactMembersInGuild
Retrieves data for all members for the given guild ID. If some members are not present in the store and thus is not able to return the full member list of the guild, it will error withExactResultNotAvailableException
.- Parameters:
guildId
- the guild ID- Returns:
- A
Flux
emitting the members, orExactResultNotAvailableException
if not all are present
-
getMemberById
Retrieves data for the member corresponding to the given guild ID and user ID.- Parameters:
guildId
- the guild IDuserId
- the user ID- Returns:
- A
Mono
emitting the member, or empty if not found
-
getMessages
Flux<discord4j.discordjson.json.MessageData> getMessages()Retrieves data for all messages present in the store.- Returns:
- A
Flux
emitting the messages, or empty if none is present
-
getMessagesInChannel
Retrieves data for all messages present in the store for the given channel ID.- Parameters:
channelId
- the channel ID- Returns:
- A
Flux
emitting the messages, or empty if none is present
-
getMessageById
Retrieves data for the message corresponding to the given channel ID and message ID.- Parameters:
channelId
- the channel IDmessageId
- the message ID- Returns:
- A
Mono
emitting the message, or empty if not found
-
getPresences
Flux<discord4j.discordjson.json.PresenceData> getPresences()Retrieves data for all presences present in the store.- Returns:
- A
Flux
emitting the presences, or empty if none is present
-
getPresencesInGuild
Retrieves data for all presences present in the store for the given guild ID.- Parameters:
guildId
- the guild ID- Returns:
- A
Flux
emitting the presences, or empty if none is present
-
getPresenceById
Retrieves data for the presence corresponding to the given guild ID and user ID.- Parameters:
guildId
- the guild IDuserId
- the user ID- Returns:
- A
Mono
emitting the presence, or empty if not found
-
getRoles
Flux<discord4j.discordjson.json.RoleData> getRoles()Retrieves data for all roles present in the store.- Returns:
- A
Flux
emitting the roles, or empty if none is present
-
getRolesInGuild
Retrieves data for all roles present in the store for the given guild ID.- Parameters:
guildId
- the guild ID- Returns:
- A
Flux
emitting the roles, or empty if none is present
-
getRoleById
Retrieves data for the role corresponding to the given guild ID and role ID.- Parameters:
guildId
- the guild IDroleId
- the role ID- Returns:
- A
Mono
emitting the role, or empty if not found
-
getUsers
Flux<discord4j.discordjson.json.UserData> getUsers()Retrieves data for all users present in the store.- Returns:
- A
Flux
emitting the users, or empty if none is present
-
getUserById
Retrieves data for the user corresponding to the given user ID.- Parameters:
userId
- the user ID- Returns:
- A
Mono
emitting the user, or empty if not found
-
getVoiceStates
Flux<discord4j.discordjson.json.VoiceStateData> getVoiceStates()Retrieves data for all voice states present in the store.- Returns:
- A
Flux
emitting the voice states, or empty if none is present
-
getVoiceStatesInChannel
Flux<discord4j.discordjson.json.VoiceStateData> getVoiceStatesInChannel(long guildId, long channelId) Retrieves data for all voice states present in the store for the given guild ID and channel ID.- Parameters:
guildId
- the guild IDchannelId
- the channel ID- Returns:
- A
Flux
emitting the voice states, or empty if none is present
-
getVoiceStatesInGuild
Retrieves data for all voice states present in the store for the given guild ID.- Parameters:
guildId
- the guild ID- Returns:
- A
Flux
emitting the voice states, or empty if none is present
-
getVoiceStateById
Retrieves data for the voice state corresponding to the given guild ID and user ID.- Parameters:
guildId
- the guild IDuserId
- the user ID- Returns:
- A
Mono
emitting the voice state, or empty if not found
-
getStageInstanceByChannelId
Retrieves data for the stage instance corresponding to the given channel ID.- Parameters:
channelId
- the channel ID- Returns:
- A
Mono
emitting the stage instance data, or empty if not found
-
getThreadMemberById
default Mono<discord4j.discordjson.json.ThreadMemberData> getThreadMemberById(long threadId, long userId) Retrieves data for the thread member corresponding to the given thread ID and user ID.- Parameters:
threadId
- the thread IDuserId
- the user ID- Returns:
- A
Mono
emitting the thread member data, or empty if not found - Since:
- 3.3.0
-
getMembersInThread
Retrieves data for all thread members present in the store for the given thread ID.- Parameters:
threadId
- the thread ID- Returns:
- A
Flux
emitting the thread members, or empty if none is present - Since:
- 3.3.0
-