Class LegacyStoreLayout

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Mono<Long> countChannels()
      Counts the number of channels present in the store.
      Mono<Long> countChannelsInGuild​(long guildId)
      Counts the number of channels present in the store for the given guild ID.
      Mono<Long> countEmojis()
      Counts the number of emojis present in the store.
      Mono<Long> countEmojisInGuild​(long guildId)
      Counts the number of emojis present in the store for the given guild ID.
      Mono<Long> countExactMembersInGuild​(long guildId)
      Counts the exact number of members for the given guild ID.
      Mono<Long> countGuilds()
      Counts the number of guilds present in the store.
      Mono<Long> countMembers()
      Counts the number of members present in the store.
      Mono<Long> countMembersInGuild​(long guildId)
      Counts the number of members present in the store for the given guild ID.
      Mono<Long> countMessages()
      Counts the number of messages present in the store.
      Mono<Long> countMessagesInChannel​(long channelId)
      Counts the number of messages present in the store for the given channel ID.
      Mono<Long> countPresences()
      Counts the number of presences present in the store.
      Mono<Long> countPresencesInGuild​(long guildId)
      Counts the number of presences present in the store for the given guild ID.
      Mono<Long> countRoles()
      Counts the number of roles present in the store.
      Mono<Long> countRolesInGuild​(long guildId)
      Counts the number of roles present in the store for the given guild ID.
      Mono<Long> countUsers()
      Counts the number of users present in the store.
      Mono<Long> countVoiceStates()
      Counts the number of voice states present in the store.
      Mono<Long> countVoiceStatesInChannel​(long guildId, long channelId)
      Counts the number of voice states present in the store for the given channel ID.
      Mono<Long> 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> getChannels()
      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.
      DataAccessor getDataAccessor()
      Returns a DataAccessor that defines action handlers for reading data from the store.
      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> getEmojis()
      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.
      GatewayDataUpdater getGatewayDataUpdater()
      Returns a GatewayDataUpdater that defines action handlers for updates received from the Discord gateway.
      Mono<discord4j.discordjson.json.GuildData> getGuildById​(long guildId)
      Retrieves data for the guild corresponding to the given guild ID.
      Flux<discord4j.discordjson.json.GuildData> getGuilds()
      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> getMembers()
      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.
      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> getMessages()
      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> getPresences()
      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.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> getVoiceStates()
      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.
      static LegacyStoreLayout of​(discord4j.store.api.service.StoreService storeService)  
      Mono<Void> onChannelCreate​(int shardIndex, discord4j.discordjson.json.gateway.ChannelCreate dispatch)
      Updates the internal state of the store according to the given ChannelCreate gateway dispatch.
      Mono<discord4j.discordjson.json.ChannelData> onChannelDelete​(int shardIndex, discord4j.discordjson.json.gateway.ChannelDelete dispatch)
      Updates the internal state of the store according to the given ChannelDelete gateway dispatch.
      Mono<discord4j.discordjson.json.ChannelData> onChannelUpdate​(int shardIndex, discord4j.discordjson.json.gateway.ChannelUpdate dispatch)
      Updates the internal state of the store according to the given ChannelUpdate gateway dispatch.
      Mono<Void> onGuildCreate​(int shardIndex, discord4j.discordjson.json.gateway.GuildCreate dispatch)
      Updates the internal state of the store according to the given GuildCreate gateway dispatch.
      Mono<discord4j.discordjson.json.GuildData> onGuildDelete​(int shardIndex, discord4j.discordjson.json.gateway.GuildDelete dispatch)
      Updates the internal state of the store according to the given GuildDelete gateway dispatch.
      Mono<Set<discord4j.discordjson.json.EmojiData>> onGuildEmojisUpdate​(int shardIndex, discord4j.discordjson.json.gateway.GuildEmojisUpdate dispatch)
      Updates the internal state of the store according to the given GuildEmojisUpdate gateway dispatch.
      Mono<Void> onGuildMemberAdd​(int shardIndex, discord4j.discordjson.json.gateway.GuildMemberAdd dispatch)
      Updates the internal state of the store according to the given GuildMemberAdd gateway dispatch.
      Mono<discord4j.discordjson.json.MemberData> onGuildMemberRemove​(int shardIndex, discord4j.discordjson.json.gateway.GuildMemberRemove dispatch)
      Updates the internal state of the store according to the given GuildMemberRemove gateway dispatch.
      Mono<Void> onGuildMembersChunk​(int shardIndex, discord4j.discordjson.json.gateway.GuildMembersChunk dispatch)
      Updates the internal state of the store according to the given GuildMembersChunk gateway dispatch.
      Mono<Void> onGuildMembersCompletion​(long guildId)
      Invoked to indicate that all members for the specified guild ID were received.
      Mono<discord4j.discordjson.json.MemberData> onGuildMemberUpdate​(int shardIndex, discord4j.discordjson.json.gateway.GuildMemberUpdate dispatch)
      Updates the internal state of the store according to the given GuildMemberUpdate gateway dispatch.
      Mono<Void> onGuildRoleCreate​(int shardIndex, discord4j.discordjson.json.gateway.GuildRoleCreate dispatch)
      Updates the internal state of the store according to the given GuildRoleCreate gateway dispatch.
      Mono<discord4j.discordjson.json.RoleData> onGuildRoleDelete​(int shardIndex, discord4j.discordjson.json.gateway.GuildRoleDelete dispatch)
      Updates the internal state of the store according to the given GuildRoleDelete gateway dispatch.
      Mono<discord4j.discordjson.json.RoleData> onGuildRoleUpdate​(int shardIndex, discord4j.discordjson.json.gateway.GuildRoleUpdate dispatch)
      Updates the internal state of the store according to the given GuildRoleUpdate gateway dispatch.
      Mono<discord4j.discordjson.json.GuildData> onGuildUpdate​(int shardIndex, discord4j.discordjson.json.gateway.GuildUpdate dispatch)
      Updates the internal state of the store according to the given GuildUpdate gateway dispatch.
      Mono<Void> onMessageCreate​(int shardIndex, discord4j.discordjson.json.gateway.MessageCreate dispatch)
      Updates the internal state of the store according to the given MessageCreate gateway dispatch.
      Mono<discord4j.discordjson.json.MessageData> onMessageDelete​(int shardIndex, discord4j.discordjson.json.gateway.MessageDelete dispatch)
      Updates the internal state of the store according to the given MessageDelete gateway dispatch.
      Mono<Set<discord4j.discordjson.json.MessageData>> onMessageDeleteBulk​(int shardIndex, discord4j.discordjson.json.gateway.MessageDeleteBulk dispatch)
      Updates the internal state of the store according to the given MessageDeleteBulk gateway dispatch.
      Mono<Void> onMessageReactionAdd​(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionAdd dispatch)
      Updates the internal state of the store according to the given MessageReactionAdd gateway dispatch.
      Mono<Void> onMessageReactionRemove​(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemove dispatch)
      Updates the internal state of the store according to the given MessageReactionRemove gateway dispatch.
      Mono<Void> onMessageReactionRemoveAll​(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemoveAll dispatch)
      Updates the internal state of the store according to the given MessageReactionRemoveAll gateway dispatch.
      Mono<Void> onMessageReactionRemoveEmoji​(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemoveEmoji dispatch)
      Updates the internal state of the store according to the given MessageReactionRemoveEmoji gateway dispatch.
      Mono<discord4j.discordjson.json.MessageData> onMessageUpdate​(int shardIndex, discord4j.discordjson.json.gateway.MessageUpdate dispatch)
      Updates the internal state of the store according to the given MessageUpdate gateway dispatch.
      Mono<PresenceAndUserData> onPresenceUpdate​(int shardIndex, discord4j.discordjson.json.gateway.PresenceUpdate dispatch)
      Updates the internal state of the store according to the given PresenceUpdate gateway dispatch.
      Mono<Void> onReady​(discord4j.discordjson.json.gateway.Ready dispatch)
      Updates the internal state of the store according to the given Ready gateway dispatch.
      Mono<Void> onShardInvalidation​(int shardIndex, InvalidationCause cause)
      Handles the invalidation of a specific shard.
      Mono<discord4j.discordjson.json.UserData> onUserUpdate​(int shardIndex, discord4j.discordjson.json.gateway.UserUpdate dispatch)
      Updates the internal state of the store according to the given UserUpdate gateway dispatch.
      Mono<discord4j.discordjson.json.VoiceStateData> onVoiceStateUpdateDispatch​(int shardIndex, discord4j.discordjson.json.gateway.VoiceStateUpdateDispatch dispatch)
      Updates the internal state of the store according to the given VoiceStateUpdateDispatch gateway dispatch.
    • Method Detail

      • of

        public static LegacyStoreLayout of​(discord4j.store.api.service.StoreService storeService)
      • countChannels

        public Mono<Long> countChannels()
        Description copied from interface: DataAccessor
        Counts the number of channels present in the store.
        Specified by:
        countChannels in interface DataAccessor
        Returns:
        A Mono emitting the channel count
      • countChannelsInGuild

        public Mono<Long> countChannelsInGuild​(long guildId)
        Description copied from interface: DataAccessor
        Counts the number of channels present in the store for the given guild ID.
        Specified by:
        countChannelsInGuild in interface DataAccessor
        Parameters:
        guildId - the guild ID
        Returns:
        A Mono emitting the channel count
      • countEmojis

        public Mono<Long> countEmojis()
        Description copied from interface: DataAccessor
        Counts the number of emojis present in the store.
        Specified by:
        countEmojis in interface DataAccessor
        Returns:
        A Mono emitting the emoji count
      • countEmojisInGuild

        public Mono<Long> countEmojisInGuild​(long guildId)
        Description copied from interface: DataAccessor
        Counts the number of emojis present in the store for the given guild ID.
        Specified by:
        countEmojisInGuild in interface DataAccessor
        Parameters:
        guildId - the guild ID
        Returns:
        A Mono emitting the emoji count
      • countGuilds

        public Mono<Long> countGuilds()
        Description copied from interface: DataAccessor
        Counts the number of guilds present in the store.
        Specified by:
        countGuilds in interface DataAccessor
        Returns:
        A Mono emitting the guild count
      • countMembers

        public Mono<Long> countMembers()
        Description copied from interface: DataAccessor
        Counts the number of members present in the store.
        Specified by:
        countMembers in interface DataAccessor
        Returns:
        A Mono emitting the member count
      • countMembersInGuild

        public Mono<Long> countMembersInGuild​(long guildId)
        Description copied from interface: DataAccessor
        Counts the number of members present in the store for the given guild ID.
        Specified by:
        countMembersInGuild in interface DataAccessor
        Parameters:
        guildId - the guild ID
        Returns:
        A Mono emitting the member count
      • countExactMembersInGuild

        public Mono<Long> countExactMembersInGuild​(long guildId)
        Description copied from interface: DataAccessor
        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.
        Specified by:
        countExactMembersInGuild in interface DataAccessor
        Parameters:
        guildId - the guild ID
        Returns:
        A Mono emitting the member count
      • countMessages

        public Mono<Long> countMessages()
        Description copied from interface: DataAccessor
        Counts the number of messages present in the store.
        Specified by:
        countMessages in interface DataAccessor
        Returns:
        A Mono emitting the message count
      • countMessagesInChannel

        public Mono<Long> countMessagesInChannel​(long channelId)
        Description copied from interface: DataAccessor
        Counts the number of messages present in the store for the given channel ID.
        Specified by:
        countMessagesInChannel in interface DataAccessor
        Parameters:
        channelId - the channel ID
        Returns:
        A Mono emitting the message count
      • countPresences

        public Mono<Long> countPresences()
        Description copied from interface: DataAccessor
        Counts the number of presences present in the store.
        Specified by:
        countPresences in interface DataAccessor
        Returns:
        A Mono emitting the presence count
      • countPresencesInGuild

        public Mono<Long> countPresencesInGuild​(long guildId)
        Description copied from interface: DataAccessor
        Counts the number of presences present in the store for the given guild ID.
        Specified by:
        countPresencesInGuild in interface DataAccessor
        Parameters:
        guildId - the guild ID
        Returns:
        A Mono emitting the presence count
      • countRoles

        public Mono<Long> countRoles()
        Description copied from interface: DataAccessor
        Counts the number of roles present in the store.
        Specified by:
        countRoles in interface DataAccessor
        Returns:
        A Mono emitting the role count
      • countRolesInGuild

        public Mono<Long> countRolesInGuild​(long guildId)
        Description copied from interface: DataAccessor
        Counts the number of roles present in the store for the given guild ID.
        Specified by:
        countRolesInGuild in interface DataAccessor
        Parameters:
        guildId - the guild ID
        Returns:
        A Mono emitting the role count
      • countUsers

        public Mono<Long> countUsers()
        Description copied from interface: DataAccessor
        Counts the number of users present in the store.
        Specified by:
        countUsers in interface DataAccessor
        Returns:
        A Mono emitting the user count
      • countVoiceStates

        public Mono<Long> countVoiceStates()
        Description copied from interface: DataAccessor
        Counts the number of voice states present in the store.
        Specified by:
        countVoiceStates in interface DataAccessor
        Returns:
        A Mono emitting the voice state count
      • countVoiceStatesInGuild

        public Mono<Long> countVoiceStatesInGuild​(long guildId)
        Description copied from interface: DataAccessor
        Counts the number of voice states present in the store for the given guild ID.
        Specified by:
        countVoiceStatesInGuild in interface DataAccessor
        Parameters:
        guildId - the guild ID
        Returns:
        A Mono emitting the voice state count
      • countVoiceStatesInChannel

        public Mono<Long> countVoiceStatesInChannel​(long guildId,
                                                    long channelId)
        Description copied from interface: DataAccessor
        Counts the number of voice states present in the store for the given channel ID.
        Specified by:
        countVoiceStatesInChannel in interface DataAccessor
        Parameters:
        guildId - the guild ID
        channelId - the channel ID
        Returns:
        A Mono emitting the voice state count
      • getChannels

        public Flux<discord4j.discordjson.json.ChannelData> getChannels()
        Description copied from interface: DataAccessor
        Retrieves data for all channels present in the store.
        Specified by:
        getChannels in interface DataAccessor
        Returns:
        A Flux emitting the channels, or empty if none is present
      • getChannelsInGuild

        public Flux<discord4j.discordjson.json.ChannelData> getChannelsInGuild​(long guildId)
        Description copied from interface: DataAccessor
        Retrieves data for all channels present in the store for the given guild ID.
        Specified by:
        getChannelsInGuild in interface DataAccessor
        Parameters:
        guildId - the guild ID
        Returns:
        A Flux emitting the channels, or empty if none is present
      • getChannelById

        public Mono<discord4j.discordjson.json.ChannelData> getChannelById​(long channelId)
        Description copied from interface: DataAccessor
        Retrieves data for the channel corresponding to the given channel ID.
        Specified by:
        getChannelById in interface DataAccessor
        Parameters:
        channelId - the channel ID
        Returns:
        A Mono emitting the channel, or empty if not found
      • getEmojis

        public Flux<discord4j.discordjson.json.EmojiData> getEmojis()
        Description copied from interface: DataAccessor
        Retrieves data for all emojis present in the store.
        Specified by:
        getEmojis in interface DataAccessor
        Returns:
        A Flux emitting the emojis, or empty if none is present
      • getEmojisInGuild

        public Flux<discord4j.discordjson.json.EmojiData> getEmojisInGuild​(long guildId)
        Description copied from interface: DataAccessor
        Retrieves data for all emojis present in the store for the given guild ID.
        Specified by:
        getEmojisInGuild in interface DataAccessor
        Parameters:
        guildId - the guild ID
        Returns:
        A Flux emitting the emojis, or empty if none is present
      • getEmojiById

        public Mono<discord4j.discordjson.json.EmojiData> getEmojiById​(long guildId,
                                                                       long emojiId)
        Description copied from interface: DataAccessor
        Retrieves data for the emoji corresponding to the given guild ID and emoji ID.
        Specified by:
        getEmojiById in interface DataAccessor
        Parameters:
        guildId - the guild ID
        emojiId - the emoji ID
        Returns:
        A Mono emitting the emoji, or empty if not found
      • getGuilds

        public Flux<discord4j.discordjson.json.GuildData> getGuilds()
        Description copied from interface: DataAccessor
        Retrieves data for all guilds present in the store.
        Specified by:
        getGuilds in interface DataAccessor
        Returns:
        A Flux emitting the guilds, or empty if none is present
      • getGuildById

        public Mono<discord4j.discordjson.json.GuildData> getGuildById​(long guildId)
        Description copied from interface: DataAccessor
        Retrieves data for the guild corresponding to the given guild ID.
        Specified by:
        getGuildById in interface DataAccessor
        Parameters:
        guildId - the guild ID
        Returns:
        A Mono emitting the guild, or empty if not found
      • getMembers

        public Flux<discord4j.discordjson.json.MemberData> getMembers()
        Description copied from interface: DataAccessor
        Retrieves data for all members present in the store.
        Specified by:
        getMembers in interface DataAccessor
        Returns:
        A Flux emitting the members, or empty if none is present
      • getMembersInGuild

        public Flux<discord4j.discordjson.json.MemberData> getMembersInGuild​(long guildId)
        Description copied from interface: DataAccessor
        Retrieves data for all members present in the store for the given guild ID.
        Specified by:
        getMembersInGuild in interface DataAccessor
        Parameters:
        guildId - the guild ID
        Returns:
        A Flux emitting the members, or empty if none is present
      • getMemberById

        public Mono<discord4j.discordjson.json.MemberData> getMemberById​(long guildId,
                                                                         long userId)
        Description copied from interface: DataAccessor
        Retrieves data for the member corresponding to the given guild ID and user ID.
        Specified by:
        getMemberById in interface DataAccessor
        Parameters:
        guildId - the guild ID
        userId - the user ID
        Returns:
        A Mono emitting the member, or empty if not found
      • getMessages

        public Flux<discord4j.discordjson.json.MessageData> getMessages()
        Description copied from interface: DataAccessor
        Retrieves data for all messages present in the store.
        Specified by:
        getMessages in interface DataAccessor
        Returns:
        A Flux emitting the messages, or empty if none is present
      • getMessagesInChannel

        public Flux<discord4j.discordjson.json.MessageData> getMessagesInChannel​(long channelId)
        Description copied from interface: DataAccessor
        Retrieves data for all messages present in the store for the given channel ID.
        Specified by:
        getMessagesInChannel in interface DataAccessor
        Parameters:
        channelId - the channel ID
        Returns:
        A Flux emitting the messages, or empty if none is present
      • getMessageById

        public Mono<discord4j.discordjson.json.MessageData> getMessageById​(long channelId,
                                                                           long messageId)
        Description copied from interface: DataAccessor
        Retrieves data for the message corresponding to the given channel ID and message ID.
        Specified by:
        getMessageById in interface DataAccessor
        Parameters:
        channelId - the channel ID
        messageId - the message ID
        Returns:
        A Mono emitting the message, or empty if not found
      • getPresences

        public Flux<discord4j.discordjson.json.PresenceData> getPresences()
        Description copied from interface: DataAccessor
        Retrieves data for all presences present in the store.
        Specified by:
        getPresences in interface DataAccessor
        Returns:
        A Flux emitting the presences, or empty if none is present
      • getPresencesInGuild

        public Flux<discord4j.discordjson.json.PresenceData> getPresencesInGuild​(long guildId)
        Description copied from interface: DataAccessor
        Retrieves data for all presences present in the store for the given guild ID.
        Specified by:
        getPresencesInGuild in interface DataAccessor
        Parameters:
        guildId - the guild ID
        Returns:
        A Flux emitting the presences, or empty if none is present
      • getPresenceById

        public Mono<discord4j.discordjson.json.PresenceData> getPresenceById​(long guildId,
                                                                             long userId)
        Description copied from interface: DataAccessor
        Retrieves data for the presence corresponding to the given guild ID and user ID.
        Specified by:
        getPresenceById in interface DataAccessor
        Parameters:
        guildId - the guild ID
        userId - the user ID
        Returns:
        A Mono emitting the presence, or empty if not found
      • getRoles

        public Flux<discord4j.discordjson.json.RoleData> getRoles()
        Description copied from interface: DataAccessor
        Retrieves data for all roles present in the store.
        Specified by:
        getRoles in interface DataAccessor
        Returns:
        A Flux emitting the roles, or empty if none is present
      • getRolesInGuild

        public Flux<discord4j.discordjson.json.RoleData> getRolesInGuild​(long guildId)
        Description copied from interface: DataAccessor
        Retrieves data for all roles present in the store for the given guild ID.
        Specified by:
        getRolesInGuild in interface DataAccessor
        Parameters:
        guildId - the guild ID
        Returns:
        A Flux emitting the roles, or empty if none is present
      • getRoleById

        public Mono<discord4j.discordjson.json.RoleData> getRoleById​(long guildId,
                                                                     long roleId)
        Description copied from interface: DataAccessor
        Retrieves data for the role corresponding to the given guild ID and role ID.
        Specified by:
        getRoleById in interface DataAccessor
        Parameters:
        guildId - the guild ID
        roleId - the role ID
        Returns:
        A Mono emitting the role, or empty if not found
      • getUsers

        public Flux<discord4j.discordjson.json.UserData> getUsers()
        Description copied from interface: DataAccessor
        Retrieves data for all users present in the store.
        Specified by:
        getUsers in interface DataAccessor
        Returns:
        A Flux emitting the users, or empty if none is present
      • getUserById

        public Mono<discord4j.discordjson.json.UserData> getUserById​(long userId)
        Description copied from interface: DataAccessor
        Retrieves data for the user corresponding to the given user ID.
        Specified by:
        getUserById in interface DataAccessor
        Parameters:
        userId - the user ID
        Returns:
        A Mono emitting the user, or empty if not found
      • getVoiceStates

        public Flux<discord4j.discordjson.json.VoiceStateData> getVoiceStates()
        Description copied from interface: DataAccessor
        Retrieves data for all voice states present in the store.
        Specified by:
        getVoiceStates in interface DataAccessor
        Returns:
        A Flux emitting the voice states, or empty if none is present
      • getVoiceStatesInChannel

        public Flux<discord4j.discordjson.json.VoiceStateData> getVoiceStatesInChannel​(long guildId,
                                                                                       long channelId)
        Description copied from interface: DataAccessor
        Retrieves data for all voice states present in the store for the given guild ID and channel ID.
        Specified by:
        getVoiceStatesInChannel in interface DataAccessor
        Parameters:
        guildId - the guild ID
        channelId - the channel ID
        Returns:
        A Flux emitting the voice states, or empty if none is present
      • getVoiceStatesInGuild

        public Flux<discord4j.discordjson.json.VoiceStateData> getVoiceStatesInGuild​(long guildId)
        Description copied from interface: DataAccessor
        Retrieves data for all voice states present in the store for the given guild ID.
        Specified by:
        getVoiceStatesInGuild in interface DataAccessor
        Parameters:
        guildId - the guild ID
        Returns:
        A Flux emitting the voice states, or empty if none is present
      • getVoiceStateById

        public Mono<discord4j.discordjson.json.VoiceStateData> getVoiceStateById​(long guildId,
                                                                                 long userId)
        Description copied from interface: DataAccessor
        Retrieves data for the voice state corresponding to the given guild ID and user ID.
        Specified by:
        getVoiceStateById in interface DataAccessor
        Parameters:
        guildId - the guild ID
        userId - the user ID
        Returns:
        A Mono emitting the voice state, or empty if not found
      • onChannelCreate

        public Mono<Void> onChannelCreate​(int shardIndex,
                                          discord4j.discordjson.json.gateway.ChannelCreate dispatch)
        Description copied from interface: GatewayDataUpdater
        Updates the internal state of the store according to the given ChannelCreate gateway dispatch. This will typically perform an insert operation on the related ChannelData, and add the ID to the list returned by GuildData.channels() if applicable.
        Specified by:
        onChannelCreate in interface GatewayDataUpdater
        Parameters:
        shardIndex - the index of the shard where the dispatch comes from
        dispatch - the dispatch data coming from Discord gateway
        Returns:
        a Mono completing when the operation is done
      • onChannelDelete

        public Mono<discord4j.discordjson.json.ChannelData> onChannelDelete​(int shardIndex,
                                                                            discord4j.discordjson.json.gateway.ChannelDelete dispatch)
        Description copied from interface: GatewayDataUpdater
        Updates the internal state of the store according to the given ChannelDelete gateway dispatch. This will typically perform a delete operation on a related ChannelData that is already present in the store, and remove the ID from the list returned by GuildData.channels() if applicable.
        Specified by:
        onChannelDelete in interface GatewayDataUpdater
        Parameters:
        shardIndex - the index of the shard where the dispatch comes from
        dispatch - the dispatch data coming from Discord gateway
        Returns:
        a Mono completing when the operation is done, optionally returning the old state of the ChannelData before the deletion
      • onChannelUpdate

        public Mono<discord4j.discordjson.json.ChannelData> onChannelUpdate​(int shardIndex,
                                                                            discord4j.discordjson.json.gateway.ChannelUpdate dispatch)
        Description copied from interface: GatewayDataUpdater
        Updates the internal state of the store according to the given ChannelUpdate gateway dispatch. This will typically perform an update operation on a related ChannelData that is already present in the store.
        Specified by:
        onChannelUpdate in interface GatewayDataUpdater
        Parameters:
        shardIndex - the index of the shard where the dispatch comes from
        dispatch - the dispatch data coming from Discord gateway
        Returns:
        a Mono completing when the operation is done, optionally returning the old state of the ChannelData before the update
      • onGuildCreate

        public Mono<Void> onGuildCreate​(int shardIndex,
                                        discord4j.discordjson.json.gateway.GuildCreate dispatch)
        Description copied from interface: GatewayDataUpdater
        Updates the internal state of the store according to the given GuildCreate gateway dispatch. This will typically perform an insert operation on the related GuildData, as well as all associated entities received in the payload, such as channels, roles, emojis, members, voice states and presences.
        Specified by:
        onGuildCreate in interface GatewayDataUpdater
        Parameters:
        shardIndex - the index of the shard where the dispatch comes from
        dispatch - the dispatch data coming from Discord gateway
        Returns:
        a Mono completing when the operation is done
      • onGuildDelete

        public Mono<discord4j.discordjson.json.GuildData> onGuildDelete​(int shardIndex,
                                                                        discord4j.discordjson.json.gateway.GuildDelete dispatch)
        Description copied from interface: GatewayDataUpdater
        Updates the internal state of the store according to the given GuildDelete gateway dispatch. This will typically perform a delete operation on a related GuildData that is already present in the store, and clean up all entities that are associated to that guild, such as the channels, the roles, the emojis, the members, the voice states and the messages.
        Specified by:
        onGuildDelete in interface GatewayDataUpdater
        Parameters:
        shardIndex - the index of the shard where the dispatch comes from
        dispatch - the dispatch data coming from Discord gateway
        Returns:
        a Mono completing when the operation is done, optionally returning the old state of the GuildData before the deletion
      • onGuildEmojisUpdate

        public Mono<Set<discord4j.discordjson.json.EmojiData>> onGuildEmojisUpdate​(int shardIndex,
                                                                                   discord4j.discordjson.json.gateway.GuildEmojisUpdate dispatch)
        Description copied from interface: GatewayDataUpdater
        Updates the internal state of the store according to the given GuildEmojisUpdate gateway dispatch. This will typically perform an update operation on a related collection of EmojiData that is already present in the store, and update the list returned by GuildData.emojis().
        Specified by:
        onGuildEmojisUpdate in interface GatewayDataUpdater
        Parameters:
        shardIndex - the index of the shard where the dispatch comes from
        dispatch - the dispatch data coming from Discord gateway
        Returns:
        a Mono completing when the operation is done, optionally returning the old state of the set of EmojiData before the update
      • onGuildMemberAdd

        public Mono<Void> onGuildMemberAdd​(int shardIndex,
                                           discord4j.discordjson.json.gateway.GuildMemberAdd dispatch)
        Description copied from interface: GatewayDataUpdater
        Updates the internal state of the store according to the given GuildMemberAdd gateway dispatch. This will typically perform an insert operation on the related MemberData, add the ID of the member into the list returned by GuildData.members(), and increment the count returned by GuildCreateFields.memberCount().
        Specified by:
        onGuildMemberAdd in interface GatewayDataUpdater
        Parameters:
        shardIndex - the index of the shard where the dispatch comes from
        dispatch - the dispatch data coming from Discord gateway
        Returns:
        a Mono completing when the operation is done
      • onGuildMemberRemove

        public Mono<discord4j.discordjson.json.MemberData> onGuildMemberRemove​(int shardIndex,
                                                                               discord4j.discordjson.json.gateway.GuildMemberRemove dispatch)
        Description copied from interface: GatewayDataUpdater
        Updates the internal state of the store according to the given GuildMemberRemove gateway dispatch. This will typically perform a delete operation on the related MemberData, remove the ID of the member from the list returned by GuildData.members(), and decrement the count returned by GuildCreateFields.memberCount().
        Specified by:
        onGuildMemberRemove in interface GatewayDataUpdater
        Parameters:
        shardIndex - the index of the shard where the dispatch comes from
        dispatch - the dispatch data coming from Discord gateway
        Returns:
        a Mono completing when the operation is done, optionally returning the old state of the MemberData before the deletion
      • onGuildMembersChunk

        public Mono<Void> onGuildMembersChunk​(int shardIndex,
                                              discord4j.discordjson.json.gateway.GuildMembersChunk dispatch)
        Description copied from interface: GatewayDataUpdater
        Updates the internal state of the store according to the given GuildMembersChunk gateway dispatch. This will typically perform the same kind of operations than GatewayDataUpdater.onGuildMemberAdd(int, GuildMemberAdd), but adapted for whole chunks of members.
        Specified by:
        onGuildMembersChunk in interface GatewayDataUpdater
        Parameters:
        shardIndex - the index of the shard where the dispatch comes from
        dispatch - the dispatch data coming from Discord gateway
        Returns:
        a Mono completing when the operation is done
      • onGuildMemberUpdate

        public Mono<discord4j.discordjson.json.MemberData> onGuildMemberUpdate​(int shardIndex,
                                                                               discord4j.discordjson.json.gateway.GuildMemberUpdate dispatch)
        Description copied from interface: GatewayDataUpdater
        Updates the internal state of the store according to the given GuildMemberUpdate gateway dispatch. This will typically perform an update operation on a related MemberData that is already present in the store.
        Specified by:
        onGuildMemberUpdate in interface GatewayDataUpdater
        Parameters:
        shardIndex - the index of the shard where the dispatch comes from
        dispatch - the dispatch data coming from Discord gateway
        Returns:
        a Mono completing when the operation is done, optionally returning the old state of the MemberData before the update
      • onGuildRoleCreate

        public Mono<Void> onGuildRoleCreate​(int shardIndex,
                                            discord4j.discordjson.json.gateway.GuildRoleCreate dispatch)
        Description copied from interface: GatewayDataUpdater
        Updates the internal state of the store according to the given GuildRoleCreate gateway dispatch. This will typically perform an insert operation on the related RoleData, and add the role ID to the list returned by GuildData.roles().
        Specified by:
        onGuildRoleCreate in interface GatewayDataUpdater
        Parameters:
        shardIndex - the index of the shard where the dispatch comes from
        dispatch - the dispatch data coming from Discord gateway
        Returns:
        a Mono completing when the operation is done
      • onGuildRoleDelete

        public Mono<discord4j.discordjson.json.RoleData> onGuildRoleDelete​(int shardIndex,
                                                                           discord4j.discordjson.json.gateway.GuildRoleDelete dispatch)
        Description copied from interface: GatewayDataUpdater
        Updates the internal state of the store according to the given GuildRoleDelete gateway dispatch. This will typically perform a delete operation on a related RoleData that is already present in the store, and remove the role ID from the list returned by GuildData.roles() and PartialMemberData.roles().
        Specified by:
        onGuildRoleDelete in interface GatewayDataUpdater
        Parameters:
        shardIndex - the index of the shard where the dispatch comes from
        dispatch - the dispatch data coming from Discord gateway
        Returns:
        a Mono completing when the operation is done, optionally returning the old state of the RoleData before the deletion
      • onGuildRoleUpdate

        public Mono<discord4j.discordjson.json.RoleData> onGuildRoleUpdate​(int shardIndex,
                                                                           discord4j.discordjson.json.gateway.GuildRoleUpdate dispatch)
        Description copied from interface: GatewayDataUpdater
        Updates the internal state of the store according to the given GuildRoleUpdate gateway dispatch. This will typically perform an update operation on a related RoleData that is already present in the store.
        Specified by:
        onGuildRoleUpdate in interface GatewayDataUpdater
        Parameters:
        shardIndex - the index of the shard where the dispatch comes from
        dispatch - the dispatch data coming from Discord gateway
        Returns:
        a Mono completing when the operation is done, optionally returning the old state of the RoleData before the update
      • onGuildUpdate

        public Mono<discord4j.discordjson.json.GuildData> onGuildUpdate​(int shardIndex,
                                                                        discord4j.discordjson.json.gateway.GuildUpdate dispatch)
        Description copied from interface: GatewayDataUpdater
        Updates the internal state of the store according to the given GuildUpdate gateway dispatch. This will typically perform an update operation on a related GuildData that is already present in the store.
        Specified by:
        onGuildUpdate in interface GatewayDataUpdater
        Parameters:
        shardIndex - the index of the shard where the dispatch comes from
        dispatch - the dispatch data coming from Discord gateway
        Returns:
        a Mono completing when the operation is done, optionally returning the old state of the GuildData before the update
      • onShardInvalidation

        public Mono<Void> onShardInvalidation​(int shardIndex,
                                              InvalidationCause cause)
        Description copied from interface: GatewayDataUpdater
        Handles the invalidation of a specific shard. When a shard is invalidated, all cached data related to it should be considered stale and the implementation may perform some cleanup work.
        Specified by:
        onShardInvalidation in interface GatewayDataUpdater
        Parameters:
        shardIndex - the index of the shard to invalidate
        cause - the cause of the invalidation
        Returns:
        a Mono completing when the operation is done
      • onMessageCreate

        public Mono<Void> onMessageCreate​(int shardIndex,
                                          discord4j.discordjson.json.gateway.MessageCreate dispatch)
        Description copied from interface: GatewayDataUpdater
        Updates the internal state of the store according to the given MessageCreate gateway dispatch. This will typically perform an insert operation on the related MessageData, and update the last_message_id field of the channel where the message was sent in.
        Specified by:
        onMessageCreate in interface GatewayDataUpdater
        Parameters:
        shardIndex - the index of the shard where the dispatch comes from
        dispatch - the dispatch data coming from Discord gateway
        Returns:
        a Mono completing when the operation is done
      • onMessageDelete

        public Mono<discord4j.discordjson.json.MessageData> onMessageDelete​(int shardIndex,
                                                                            discord4j.discordjson.json.gateway.MessageDelete dispatch)
        Description copied from interface: GatewayDataUpdater
        Updates the internal state of the store according to the given MessageDelete gateway dispatch. This will typically perform a delete operation on a related MessageData that is already present in the store.
        Specified by:
        onMessageDelete in interface GatewayDataUpdater
        Parameters:
        shardIndex - the index of the shard where the dispatch comes from
        dispatch - the dispatch data coming from Discord gateway
        Returns:
        a Mono completing when the operation is done, optionally returning the old state of the MessageData before the deletion
      • onMessageDeleteBulk

        public Mono<Set<discord4j.discordjson.json.MessageData>> onMessageDeleteBulk​(int shardIndex,
                                                                                     discord4j.discordjson.json.gateway.MessageDeleteBulk dispatch)
        Description copied from interface: GatewayDataUpdater
        Updates the internal state of the store according to the given MessageDeleteBulk gateway dispatch. This will typically perform a delete operation on a related collection of MessageData that is already present in the store.
        Specified by:
        onMessageDeleteBulk in interface GatewayDataUpdater
        Parameters:
        shardIndex - the index of the shard where the dispatch comes from
        dispatch - the dispatch data coming from Discord gateway
        Returns:
        a Mono completing when the operation is done, optionally returning the old state of the set of MessageData before the deletion
      • onMessageReactionAdd

        public Mono<Void> onMessageReactionAdd​(int shardIndex,
                                               discord4j.discordjson.json.gateway.MessageReactionAdd dispatch)
        Description copied from interface: GatewayDataUpdater
        Updates the internal state of the store according to the given MessageReactionAdd gateway dispatch. This will typically perform an update operation on a related MessageData that is already present in the store in order to add the reaction.
        Specified by:
        onMessageReactionAdd in interface GatewayDataUpdater
        Parameters:
        shardIndex - the index of the shard where the dispatch comes from
        dispatch - the dispatch data coming from Discord gateway
        Returns:
        a Mono completing when the operation is done
      • onMessageReactionRemove

        public Mono<Void> onMessageReactionRemove​(int shardIndex,
                                                  discord4j.discordjson.json.gateway.MessageReactionRemove dispatch)
        Description copied from interface: GatewayDataUpdater
        Updates the internal state of the store according to the given MessageReactionRemove gateway dispatch. This will typically perform an update operation on a related MessageData that is already present in the store in order to remove the reaction.
        Specified by:
        onMessageReactionRemove in interface GatewayDataUpdater
        Parameters:
        shardIndex - the index of the shard where the dispatch comes from
        dispatch - the dispatch data coming from Discord gateway
        Returns:
        a Mono completing when the operation is done
      • onMessageReactionRemoveAll

        public Mono<Void> onMessageReactionRemoveAll​(int shardIndex,
                                                     discord4j.discordjson.json.gateway.MessageReactionRemoveAll dispatch)
        Description copied from interface: GatewayDataUpdater
        Updates the internal state of the store according to the given MessageReactionRemoveAll gateway dispatch. This will typically perform an update operation on a related MessageData that is already present in the store in order to remove all reactions.
        Specified by:
        onMessageReactionRemoveAll in interface GatewayDataUpdater
        Parameters:
        shardIndex - the index of the shard where the dispatch comes from
        dispatch - the dispatch data coming from Discord gateway
        Returns:
        a Mono completing when the operation is done
      • onMessageReactionRemoveEmoji

        public Mono<Void> onMessageReactionRemoveEmoji​(int shardIndex,
                                                       discord4j.discordjson.json.gateway.MessageReactionRemoveEmoji dispatch)
        Description copied from interface: GatewayDataUpdater
        Updates the internal state of the store according to the given MessageReactionRemoveEmoji gateway dispatch. This will typically perform an update operation on a related MessageData that is already present in the store in order to remove all reactions for a specific emoji.
        Specified by:
        onMessageReactionRemoveEmoji in interface GatewayDataUpdater
        Parameters:
        shardIndex - the index of the shard where the dispatch comes from
        dispatch - the dispatch data coming from Discord gateway
        Returns:
        a Mono completing when the operation is done
      • onMessageUpdate

        public Mono<discord4j.discordjson.json.MessageData> onMessageUpdate​(int shardIndex,
                                                                            discord4j.discordjson.json.gateway.MessageUpdate dispatch)
        Description copied from interface: GatewayDataUpdater
        Updates the internal state of the store according to the given MessageUpdate gateway dispatch. This will typically perform an update operation on a related MessageData that is already present in the store.
        Specified by:
        onMessageUpdate in interface GatewayDataUpdater
        Parameters:
        shardIndex - the index of the shard where the dispatch comes from
        dispatch - the dispatch data coming from Discord gateway
        Returns:
        a Mono completing when the operation is done, optionally returning the old state of the MessageData before the update
      • onPresenceUpdate

        public Mono<PresenceAndUserData> onPresenceUpdate​(int shardIndex,
                                                          discord4j.discordjson.json.gateway.PresenceUpdate dispatch)
        Description copied from interface: GatewayDataUpdater
        Updates the internal state of the store according to the given PresenceUpdate gateway dispatch. This will typically perform an insert or an update operation on the related PresenceData, and update the related UserData to reflect the new presence.
        Specified by:
        onPresenceUpdate in interface GatewayDataUpdater
        Parameters:
        shardIndex - the index of the shard where the dispatch comes from
        dispatch - the dispatch data coming from Discord gateway
        Returns:
        a Mono completing when the operation is done, optionally returning the old state of both the PresenceData and the UserData before the update
      • onReady

        public Mono<Void> onReady​(discord4j.discordjson.json.gateway.Ready dispatch)
        Description copied from interface: GatewayDataUpdater
        Updates the internal state of the store according to the given Ready gateway dispatch. This will typically perform an insert operation on the UserData that represents the self-user, and allocate the resources needed to receive further events happening on this shard index.
        Specified by:
        onReady in interface GatewayDataUpdater
        Parameters:
        dispatch - the dispatch data coming from Discord gateway
        Returns:
        a Mono completing when the operation is done
      • onUserUpdate

        public Mono<discord4j.discordjson.json.UserData> onUserUpdate​(int shardIndex,
                                                                      discord4j.discordjson.json.gateway.UserUpdate dispatch)
        Description copied from interface: GatewayDataUpdater
        Updates the internal state of the store according to the given UserUpdate gateway dispatch. This will typically perform an update operation on a related UserData that is already present in the store.
        Specified by:
        onUserUpdate in interface GatewayDataUpdater
        Parameters:
        shardIndex - the index of the shard where the dispatch comes from
        dispatch - the dispatch data coming from Discord gateway
        Returns:
        a Mono completing when the operation is done, optionally returning the old state of the UserData before the update
      • onVoiceStateUpdateDispatch

        public Mono<discord4j.discordjson.json.VoiceStateData> onVoiceStateUpdateDispatch​(int shardIndex,
                                                                                          discord4j.discordjson.json.gateway.VoiceStateUpdateDispatch dispatch)
        Description copied from interface: GatewayDataUpdater
        Updates the internal state of the store according to the given VoiceStateUpdateDispatch gateway dispatch. This will typically perform an insert, update or delete operation on the related VoiceStateData.
        Specified by:
        onVoiceStateUpdateDispatch in interface GatewayDataUpdater
        Parameters:
        shardIndex - the index of the shard where the dispatch comes from
        dispatch - the dispatch data coming from Discord gateway
        Returns:
        a Mono completing when the operation is done, optionally returning the old state of the VoiceStateData before the update