Interface DataAccessor

All Known Implementing Classes:
LegacyStoreLayout, LocalStoreLayout

public interface DataAccessor
Defines methods to handle read operations on a store.
  • Method Summary

    Modifier and Type
    Method
    Description
    Counts 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.
    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.
    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>
    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>
    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>
    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

      Mono<Long> countChannels()
      Counts the number of channels present in the store.
      Returns:
      A Mono emitting the channel count
    • countChannelsInGuild

      Mono<Long> countChannelsInGuild(long guildId)
      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

      Mono<Long> countStickers()
      Counts the number of stickers present in the store.
      Returns:
      A Mono emitting the sticker count
      Since:
      3.2.3
    • countStickersInGuild

      Mono<Long> countStickersInGuild(long guildId)
      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

      Mono<Long> countEmojis()
      Counts the number of emojis present in the store.
      Returns:
      A Mono emitting the emoji count
    • countEmojisInGuild

      Mono<Long> countEmojisInGuild(long guildId)
      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

      Mono<Long> countGuilds()
      Counts the number of guilds present in the store.
      Returns:
      A Mono emitting the guild count
    • countMembers

      Mono<Long> countMembers()
      Counts the number of members present in the store.
      Returns:
      A Mono emitting the member count
    • countMembersInGuild

      Mono<Long> countMembersInGuild(long guildId)
      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

      Mono<Long> countExactMembersInGuild(long guildId)
      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 with ExactResultNotAvailableException.
      Parameters:
      guildId - the guild ID
      Returns:
      A Mono emitting the member count
    • countMessages

      Mono<Long> countMessages()
      Counts the number of messages present in the store.
      Returns:
      A Mono emitting the message count
    • countMessagesInChannel

      Mono<Long> countMessagesInChannel(long channelId)
      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

      Mono<Long> countPresences()
      Counts the number of presences present in the store.
      Returns:
      A Mono emitting the presence count
    • countPresencesInGuild

      Mono<Long> countPresencesInGuild(long guildId)
      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

      Mono<Long> countRoles()
      Counts the number of roles present in the store.
      Returns:
      A Mono emitting the role count
    • countRolesInGuild

      Mono<Long> countRolesInGuild(long guildId)
      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

      Mono<Long> countUsers()
      Counts the number of users present in the store.
      Returns:
      A Mono emitting the user count
    • countVoiceStates

      Mono<Long> countVoiceStates()
      Counts the number of voice states present in the store.
      Returns:
      A Mono emitting the voice state count
    • countVoiceStatesInGuild

      Mono<Long> countVoiceStatesInGuild(long guildId)
      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

      Mono<Long> countVoiceStatesInChannel(long guildId, long channelId)
      Counts the number of voice states present in the store for the given channel ID.
      Parameters:
      guildId - the guild ID
      channelId - 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

      Flux<discord4j.discordjson.json.ChannelData> getChannelsInGuild(long guildId)
      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

      Mono<discord4j.discordjson.json.ChannelData> getChannelById(long channelId)
      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

      Flux<discord4j.discordjson.json.StickerData> getStickersInGuild(long guildId)
      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

      Mono<discord4j.discordjson.json.StickerData> getStickerById(long guildId, long stickerId)
      Retrieves data for the sticker corresponding to the given guild ID and sticker ID.
      Parameters:
      guildId - the guild ID
      stickerId - 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

      Flux<discord4j.discordjson.json.EmojiData> getEmojisInGuild(long guildId)
      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

      Mono<discord4j.discordjson.json.EmojiData> getEmojiById(long guildId, long emojiId)
      Retrieves data for the emoji corresponding to the given guild ID and emoji ID.
      Parameters:
      guildId - the guild ID
      emojiId - 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

      Mono<discord4j.discordjson.json.GuildData> getGuildById(long guildId)
      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

      Flux<discord4j.discordjson.json.MemberData> getMembersInGuild(long guildId)
      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

      Flux<discord4j.discordjson.json.MemberData> getExactMembersInGuild(long guildId)
      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 with ExactResultNotAvailableException.
      Parameters:
      guildId - the guild ID
      Returns:
      A Flux emitting the members, or ExactResultNotAvailableException if not all are present
    • getMemberById

      Mono<discord4j.discordjson.json.MemberData> getMemberById(long guildId, long userId)
      Retrieves data for the member corresponding to the given guild ID and user ID.
      Parameters:
      guildId - the guild ID
      userId - 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

      Flux<discord4j.discordjson.json.MessageData> getMessagesInChannel(long channelId)
      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

      Mono<discord4j.discordjson.json.MessageData> getMessageById(long channelId, long messageId)
      Retrieves data for the message corresponding to the given channel ID and message ID.
      Parameters:
      channelId - the channel ID
      messageId - 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

      Flux<discord4j.discordjson.json.PresenceData> getPresencesInGuild(long guildId)
      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

      Mono<discord4j.discordjson.json.PresenceData> getPresenceById(long guildId, long userId)
      Retrieves data for the presence corresponding to the given guild ID and user ID.
      Parameters:
      guildId - the guild ID
      userId - 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

      Flux<discord4j.discordjson.json.RoleData> getRolesInGuild(long guildId)
      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

      Mono<discord4j.discordjson.json.RoleData> getRoleById(long guildId, long roleId)
      Retrieves data for the role corresponding to the given guild ID and role ID.
      Parameters:
      guildId - the guild ID
      roleId - 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

      Mono<discord4j.discordjson.json.UserData> getUserById(long userId)
      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 ID
      channelId - the channel ID
      Returns:
      A Flux emitting the voice states, or empty if none is present
    • getVoiceStatesInGuild

      Flux<discord4j.discordjson.json.VoiceStateData> getVoiceStatesInGuild(long guildId)
      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

      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.
      Parameters:
      guildId - the guild ID
      userId - the user ID
      Returns:
      A Mono emitting the voice state, or empty if not found
    • getStageInstanceByChannelId

      Mono<discord4j.discordjson.json.StageInstanceData> getStageInstanceByChannelId(long channelId)
      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 ID
      userId - the user ID
      Returns:
      A Mono emitting the thread member data, or empty if not found
      Since:
      3.3.0
    • getMembersInThread

      default Flux<discord4j.discordjson.json.ThreadMemberData> getMembersInThread(long threadId)
      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