Package discord4j.common.store.legacy
Class LegacyStoreLayout
java.lang.Object
discord4j.common.store.legacy.LegacyStoreLayout
- All Implemented Interfaces:
DataAccessor
,GatewayDataUpdater
,StoreLayout
public class LegacyStoreLayout
extends Object
implements StoreLayout, DataAccessor, GatewayDataUpdater
-
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.Returns aDataAccessor
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>
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.Returns aGatewayDataUpdater
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>
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.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.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.static LegacyStoreLayout
of
(discord4j.store.api.service.StoreService storeService) onChannelCreate
(int shardIndex, discord4j.discordjson.json.gateway.ChannelCreate dispatch) Updates the internal state of the store according to the givenChannelCreate
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 givenChannelDelete
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 givenChannelUpdate
gateway dispatch.onGuildCreate
(int shardIndex, discord4j.discordjson.json.gateway.GuildCreate dispatch) Updates the internal state of the store according to the givenGuildCreate
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 givenGuildDelete
gateway dispatch.onGuildEmojisUpdate
(int shardIndex, discord4j.discordjson.json.gateway.GuildEmojisUpdate dispatch) Updates the internal state of the store according to the givenGuildEmojisUpdate
gateway dispatch.onGuildMemberAdd
(int shardIndex, discord4j.discordjson.json.gateway.GuildMemberAdd dispatch) Updates the internal state of the store according to the givenGuildMemberAdd
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 givenGuildMemberRemove
gateway dispatch.onGuildMembersChunk
(int shardIndex, discord4j.discordjson.json.gateway.GuildMembersChunk dispatch) Updates the internal state of the store according to the givenGuildMembersChunk
gateway dispatch.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 givenGuildMemberUpdate
gateway dispatch.onGuildRoleCreate
(int shardIndex, discord4j.discordjson.json.gateway.GuildRoleCreate dispatch) Updates the internal state of the store according to the givenGuildRoleCreate
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 givenGuildRoleDelete
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 givenGuildRoleUpdate
gateway dispatch.onGuildStickersUpdate
(int shardIndex, discord4j.discordjson.json.gateway.GuildStickersUpdate dispatch) Updates the internal state of the store according to the givenGuildStickersUpdate
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 givenGuildUpdate
gateway dispatch.onMessageCreate
(int shardIndex, discord4j.discordjson.json.gateway.MessageCreate dispatch) Updates the internal state of the store according to the givenMessageCreate
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 givenMessageDelete
gateway dispatch.onMessageDeleteBulk
(int shardIndex, discord4j.discordjson.json.gateway.MessageDeleteBulk dispatch) Updates the internal state of the store according to the givenMessageDeleteBulk
gateway dispatch.onMessageReactionAdd
(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionAdd dispatch) Updates the internal state of the store according to the givenMessageReactionAdd
gateway dispatch.onMessageReactionRemove
(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemove dispatch) Updates the internal state of the store according to the givenMessageReactionRemove
gateway dispatch.onMessageReactionRemoveAll
(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemoveAll dispatch) Updates the internal state of the store according to the givenMessageReactionRemoveAll
gateway dispatch.onMessageReactionRemoveEmoji
(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemoveEmoji dispatch) Updates the internal state of the store according to the givenMessageReactionRemoveEmoji
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 givenMessageUpdate
gateway dispatch.onPresenceUpdate
(int shardIndex, discord4j.discordjson.json.gateway.PresenceUpdate dispatch) Updates the internal state of the store according to the givenPresenceUpdate
gateway dispatch.onReady
(discord4j.discordjson.json.gateway.Ready dispatch) Updates the internal state of the store according to the givenReady
gateway dispatch.onShardInvalidation
(int shardIndex, InvalidationCause cause) Handles the invalidation of a specific shard.onStageInstanceCreate
(int shardIndex, discord4j.discordjson.json.gateway.StageInstanceCreate dispatch) Updates the internal state of the store according to the givenStageInstanceCreate
gateway dispatch.Mono<discord4j.discordjson.json.StageInstanceData>
onStageInstanceDelete
(int shardIndex, discord4j.discordjson.json.gateway.StageInstanceDelete dispatch) Updates the internal state of the store according to the givenStageInstanceCreate
gateway dispatch.Mono<discord4j.discordjson.json.StageInstanceData>
onStageInstanceUpdate
(int shardIndex, discord4j.discordjson.json.gateway.StageInstanceUpdate dispatch) Updates the internal state of the store according to the givenStageInstanceCreate
gateway dispatch.onThreadCreate
(int shardIndex, discord4j.discordjson.json.gateway.ThreadCreate dispatch) Updates the internal state of the store according to the givenThreadCreate
gateway dispatch.onThreadDelete
(int shardIndex, discord4j.discordjson.json.gateway.ThreadDelete dispatch) Updates the internal state of the store according to the givenThreadDelete
gateway dispatch.onThreadListSync
(int shardIndex, discord4j.discordjson.json.gateway.ThreadListSync dispatch) Updates the internal state of the store according to the givenThreadListSync
gateway dispatch.onThreadMembersUpdate
(int shardIndex, discord4j.discordjson.json.gateway.ThreadMembersUpdate dispatch) Updates the internal state of the store according to the givenThreadMembersUpdate
gateway dispatch.Mono<discord4j.discordjson.json.ThreadMemberData>
onThreadMemberUpdate
(int shardIndex, discord4j.discordjson.json.gateway.ThreadMemberUpdate dispatch) Updates the internal state of the store according to the givenThreadMemberUpdate
gateway dispatch.Mono<discord4j.discordjson.json.ChannelData>
onThreadUpdate
(int shardIndex, discord4j.discordjson.json.gateway.ThreadUpdate dispatch) Updates the internal state of the store according to the givenThreadUpdate
gateway dispatch.Mono<discord4j.discordjson.json.UserData>
onUserUpdate
(int shardIndex, discord4j.discordjson.json.gateway.UserUpdate dispatch) Updates the internal state of the store according to the givenUserUpdate
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 givenVoiceStateUpdateDispatch
gateway dispatch.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface discord4j.common.store.api.layout.StoreLayout
getCustomActionMapper
-
Method Details
-
of
-
getDataAccessor
Description copied from interface:StoreLayout
Returns aDataAccessor
that defines action handlers for reading data from the store.- Specified by:
getDataAccessor
in interfaceStoreLayout
- Returns:
- a
DataAccessor
-
getGatewayDataUpdater
Description copied from interface:StoreLayout
Returns aGatewayDataUpdater
that defines action handlers for updates received from the Discord gateway.- Specified by:
getGatewayDataUpdater
in interfaceStoreLayout
- Returns:
- a
GatewayDataUpdater
-
countChannels
Description copied from interface:DataAccessor
Counts the number of channels present in the store.- Specified by:
countChannels
in interfaceDataAccessor
- Returns:
- A
Mono
emitting the channel count
-
countChannelsInGuild
Description copied from interface:DataAccessor
Counts the number of channels present in the store for the given guild ID.- Specified by:
countChannelsInGuild
in interfaceDataAccessor
- Parameters:
guildId
- the guild ID- Returns:
- A
Mono
emitting the channel count
-
countStickers
Description copied from interface:DataAccessor
Counts the number of stickers present in the store.- Specified by:
countStickers
in interfaceDataAccessor
- Returns:
- A
Mono
emitting the sticker count
-
countStickersInGuild
Description copied from interface:DataAccessor
Counts the number of stickers present in the store for the given guild ID.- Specified by:
countStickersInGuild
in interfaceDataAccessor
- Parameters:
guildId
- the guild ID- Returns:
- A
Mono
emitting the sticker count
-
countEmojis
Description copied from interface:DataAccessor
Counts the number of emojis present in the store.- Specified by:
countEmojis
in interfaceDataAccessor
- Returns:
- A
Mono
emitting the emoji count
-
countEmojisInGuild
Description copied from interface:DataAccessor
Counts the number of emojis present in the store for the given guild ID.- Specified by:
countEmojisInGuild
in interfaceDataAccessor
- Parameters:
guildId
- the guild ID- Returns:
- A
Mono
emitting the emoji count
-
countGuilds
Description copied from interface:DataAccessor
Counts the number of guilds present in the store.- Specified by:
countGuilds
in interfaceDataAccessor
- Returns:
- A
Mono
emitting the guild count
-
countMembers
Description copied from interface:DataAccessor
Counts the number of members present in the store.- Specified by:
countMembers
in interfaceDataAccessor
- Returns:
- A
Mono
emitting the member count
-
countMembersInGuild
Description copied from interface:DataAccessor
Counts the number of members present in the store for the given guild ID.- Specified by:
countMembersInGuild
in interfaceDataAccessor
- Parameters:
guildId
- the guild ID- Returns:
- A
Mono
emitting the member count
-
countExactMembersInGuild
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 withExactResultNotAvailableException
.- Specified by:
countExactMembersInGuild
in interfaceDataAccessor
- Parameters:
guildId
- the guild ID- Returns:
- A
Mono
emitting the member count
-
countMessages
Description copied from interface:DataAccessor
Counts the number of messages present in the store.- Specified by:
countMessages
in interfaceDataAccessor
- Returns:
- A
Mono
emitting the message count
-
countMessagesInChannel
Description copied from interface:DataAccessor
Counts the number of messages present in the store for the given channel ID.- Specified by:
countMessagesInChannel
in interfaceDataAccessor
- Parameters:
channelId
- the channel ID- Returns:
- A
Mono
emitting the message count
-
countPresences
Description copied from interface:DataAccessor
Counts the number of presences present in the store.- Specified by:
countPresences
in interfaceDataAccessor
- Returns:
- A
Mono
emitting the presence count
-
countPresencesInGuild
Description copied from interface:DataAccessor
Counts the number of presences present in the store for the given guild ID.- Specified by:
countPresencesInGuild
in interfaceDataAccessor
- Parameters:
guildId
- the guild ID- Returns:
- A
Mono
emitting the presence count
-
countRoles
Description copied from interface:DataAccessor
Counts the number of roles present in the store.- Specified by:
countRoles
in interfaceDataAccessor
- Returns:
- A
Mono
emitting the role count
-
countRolesInGuild
Description copied from interface:DataAccessor
Counts the number of roles present in the store for the given guild ID.- Specified by:
countRolesInGuild
in interfaceDataAccessor
- Parameters:
guildId
- the guild ID- Returns:
- A
Mono
emitting the role count
-
countUsers
Description copied from interface:DataAccessor
Counts the number of users present in the store.- Specified by:
countUsers
in interfaceDataAccessor
- Returns:
- A
Mono
emitting the user count
-
countVoiceStates
Description copied from interface:DataAccessor
Counts the number of voice states present in the store.- Specified by:
countVoiceStates
in interfaceDataAccessor
- Returns:
- A
Mono
emitting the voice state count
-
countVoiceStatesInGuild
Description copied from interface:DataAccessor
Counts the number of voice states present in the store for the given guild ID.- Specified by:
countVoiceStatesInGuild
in interfaceDataAccessor
- Parameters:
guildId
- the guild ID- Returns:
- A
Mono
emitting the voice state count
-
countVoiceStatesInChannel
Description copied from interface:DataAccessor
Counts the number of voice states present in the store for the given channel ID.- Specified by:
countVoiceStatesInChannel
in interfaceDataAccessor
- Parameters:
guildId
- the guild IDchannelId
- the channel ID- Returns:
- A
Mono
emitting the voice state count
-
getChannels
Description copied from interface:DataAccessor
Retrieves data for all channels present in the store.- Specified by:
getChannels
in interfaceDataAccessor
- Returns:
- A
Flux
emitting the channels, or empty if none is present
-
getChannelsInGuild
Description copied from interface:DataAccessor
Retrieves data for all channels present in the store for the given guild ID.- Specified by:
getChannelsInGuild
in interfaceDataAccessor
- Parameters:
guildId
- the guild ID- Returns:
- A
Flux
emitting the channels, or empty if none is present
-
getChannelById
Description copied from interface:DataAccessor
Retrieves data for the channel corresponding to the given channel ID.- Specified by:
getChannelById
in interfaceDataAccessor
- Parameters:
channelId
- the channel ID- Returns:
- A
Mono
emitting the channel, or empty if not found
-
getStickers
Description copied from interface:DataAccessor
Retrieves data for all stickers present in the store.- Specified by:
getStickers
in interfaceDataAccessor
- Returns:
- A
Flux
emitting the stickers, or empty if none is present
-
getStickersInGuild
Description copied from interface:DataAccessor
Retrieves data for all stickers present in the store for the given guild ID.- Specified by:
getStickersInGuild
in interfaceDataAccessor
- Parameters:
guildId
- the guild ID- Returns:
- A
Flux
emitting the stickers, or empty if none is present
-
getStickerById
Description copied from interface:DataAccessor
Retrieves data for the sticker corresponding to the given guild ID and sticker ID.- Specified by:
getStickerById
in interfaceDataAccessor
- Parameters:
guildId
- the guild IDstickerId
- the sticker ID- Returns:
- A
Mono
emitting the sticker, or empty if not found
-
getEmojis
Description copied from interface:DataAccessor
Retrieves data for all emojis present in the store.- Specified by:
getEmojis
in interfaceDataAccessor
- Returns:
- A
Flux
emitting the emojis, or empty if none is present
-
getEmojisInGuild
Description copied from interface:DataAccessor
Retrieves data for all emojis present in the store for the given guild ID.- Specified by:
getEmojisInGuild
in interfaceDataAccessor
- Parameters:
guildId
- the guild ID- Returns:
- A
Flux
emitting the emojis, or empty if none is present
-
getEmojiById
Description copied from interface:DataAccessor
Retrieves data for the emoji corresponding to the given guild ID and emoji ID.- Specified by:
getEmojiById
in interfaceDataAccessor
- Parameters:
guildId
- the guild IDemojiId
- the emoji ID- Returns:
- A
Mono
emitting the emoji, or empty if not found
-
getGuilds
Description copied from interface:DataAccessor
Retrieves data for all guilds present in the store.- Specified by:
getGuilds
in interfaceDataAccessor
- Returns:
- A
Flux
emitting the guilds, or empty if none is present
-
getGuildById
Description copied from interface:DataAccessor
Retrieves data for the guild corresponding to the given guild ID.- Specified by:
getGuildById
in interfaceDataAccessor
- Parameters:
guildId
- the guild ID- Returns:
- A
Mono
emitting the guild, or empty if not found
-
getMembers
Description copied from interface:DataAccessor
Retrieves data for all members present in the store.- Specified by:
getMembers
in interfaceDataAccessor
- Returns:
- A
Flux
emitting the members, or empty if none is present
-
getMembersInGuild
Description copied from interface:DataAccessor
Retrieves data for all members present in the store for the given guild ID.- Specified by:
getMembersInGuild
in interfaceDataAccessor
- Parameters:
guildId
- the guild ID- Returns:
- A
Flux
emitting the members, or empty if none is present
-
getExactMembersInGuild
Description copied from interface:DataAccessor
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
.- Specified by:
getExactMembersInGuild
in interfaceDataAccessor
- Parameters:
guildId
- the guild ID- Returns:
- A
Flux
emitting the members, orExactResultNotAvailableException
if not all are present
-
getMemberById
Description copied from interface:DataAccessor
Retrieves data for the member corresponding to the given guild ID and user ID.- Specified by:
getMemberById
in interfaceDataAccessor
- Parameters:
guildId
- the guild IDuserId
- the user ID- Returns:
- A
Mono
emitting the member, or empty if not found
-
getMessages
Description copied from interface:DataAccessor
Retrieves data for all messages present in the store.- Specified by:
getMessages
in interfaceDataAccessor
- Returns:
- A
Flux
emitting the messages, or empty if none is present
-
getMessagesInChannel
Description copied from interface:DataAccessor
Retrieves data for all messages present in the store for the given channel ID.- Specified by:
getMessagesInChannel
in interfaceDataAccessor
- Parameters:
channelId
- the channel ID- Returns:
- A
Flux
emitting the messages, or empty if none is present
-
getMessageById
Description copied from interface:DataAccessor
Retrieves data for the message corresponding to the given channel ID and message ID.- Specified by:
getMessageById
in interfaceDataAccessor
- Parameters:
channelId
- the channel IDmessageId
- the message ID- Returns:
- A
Mono
emitting the message, or empty if not found
-
getPresences
Description copied from interface:DataAccessor
Retrieves data for all presences present in the store.- Specified by:
getPresences
in interfaceDataAccessor
- Returns:
- A
Flux
emitting the presences, or empty if none is present
-
getPresencesInGuild
Description copied from interface:DataAccessor
Retrieves data for all presences present in the store for the given guild ID.- Specified by:
getPresencesInGuild
in interfaceDataAccessor
- Parameters:
guildId
- the guild ID- Returns:
- A
Flux
emitting the presences, or empty if none is present
-
getPresenceById
Description copied from interface:DataAccessor
Retrieves data for the presence corresponding to the given guild ID and user ID.- Specified by:
getPresenceById
in interfaceDataAccessor
- Parameters:
guildId
- the guild IDuserId
- the user ID- Returns:
- A
Mono
emitting the presence, or empty if not found
-
getRoles
Description copied from interface:DataAccessor
Retrieves data for all roles present in the store.- Specified by:
getRoles
in interfaceDataAccessor
- Returns:
- A
Flux
emitting the roles, or empty if none is present
-
getRolesInGuild
Description copied from interface:DataAccessor
Retrieves data for all roles present in the store for the given guild ID.- Specified by:
getRolesInGuild
in interfaceDataAccessor
- Parameters:
guildId
- the guild ID- Returns:
- A
Flux
emitting the roles, or empty if none is present
-
getRoleById
Description copied from interface:DataAccessor
Retrieves data for the role corresponding to the given guild ID and role ID.- Specified by:
getRoleById
in interfaceDataAccessor
- Parameters:
guildId
- the guild IDroleId
- the role ID- Returns:
- A
Mono
emitting the role, or empty if not found
-
getUsers
Description copied from interface:DataAccessor
Retrieves data for all users present in the store.- Specified by:
getUsers
in interfaceDataAccessor
- Returns:
- A
Flux
emitting the users, or empty if none is present
-
getUserById
Description copied from interface:DataAccessor
Retrieves data for the user corresponding to the given user ID.- Specified by:
getUserById
in interfaceDataAccessor
- Parameters:
userId
- the user ID- Returns:
- A
Mono
emitting the user, or empty if not found
-
getVoiceStates
Description copied from interface:DataAccessor
Retrieves data for all voice states present in the store.- Specified by:
getVoiceStates
in interfaceDataAccessor
- 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 interfaceDataAccessor
- Parameters:
guildId
- the guild IDchannelId
- the channel ID- Returns:
- A
Flux
emitting the voice states, or empty if none is present
-
getVoiceStatesInGuild
Description copied from interface:DataAccessor
Retrieves data for all voice states present in the store for the given guild ID.- Specified by:
getVoiceStatesInGuild
in interfaceDataAccessor
- Parameters:
guildId
- the guild ID- Returns:
- A
Flux
emitting the voice states, or empty if none is present
-
getVoiceStateById
Description copied from interface:DataAccessor
Retrieves data for the voice state corresponding to the given guild ID and user ID.- Specified by:
getVoiceStateById
in interfaceDataAccessor
- Parameters:
guildId
- the guild IDuserId
- the user ID- Returns:
- A
Mono
emitting the voice state, or empty if not found
-
getStageInstanceByChannelId
public Mono<discord4j.discordjson.json.StageInstanceData> getStageInstanceByChannelId(long channelId) Description copied from interface:DataAccessor
Retrieves data for the stage instance corresponding to the given channel ID.- Specified by:
getStageInstanceByChannelId
in interfaceDataAccessor
- Parameters:
channelId
- the channel ID- Returns:
- A
Mono
emitting the stage instance data, or empty if not found
-
getThreadMemberById
public Mono<discord4j.discordjson.json.ThreadMemberData> getThreadMemberById(long threadId, long userId) Description copied from interface:DataAccessor
Retrieves data for the thread member corresponding to the given thread ID and user ID.- Specified by:
getThreadMemberById
in interfaceDataAccessor
- Parameters:
threadId
- the thread IDuserId
- the user ID- Returns:
- A
Mono
emitting the thread member data, or empty if not found
-
getMembersInThread
Description copied from interface:DataAccessor
Retrieves data for all thread members present in the store for the given thread ID.- Specified by:
getMembersInThread
in interfaceDataAccessor
- Parameters:
threadId
- the thread ID- Returns:
- A
Flux
emitting the thread members, or empty if none is present
-
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 givenChannelCreate
gateway dispatch. This will typically perform an insert operation on the relatedChannelData
, and add the ID to the list returned byGuildData.channels()
if applicable.- Specified by:
onChannelCreate
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- 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 givenChannelDelete
gateway dispatch. This will typically perform a delete operation on a relatedChannelData
that is already present in the store, and remove the ID from the list returned byGuildData.channels()
if applicable.- Specified by:
onChannelDelete
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a
Mono
completing when the operation is done, optionally returning the old state of theChannelData
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 givenChannelUpdate
gateway dispatch. This will typically perform an update operation on a relatedChannelData
that is already present in the store.- Specified by:
onChannelUpdate
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a
Mono
completing when the operation is done, optionally returning the old state of theChannelData
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 givenGuildCreate
gateway dispatch. This will typically perform an insert operation on the relatedGuildData
, as well as all associated entities received in the payload, such as channels, roles, emojis, members, voice states and presences.- Specified by:
onGuildCreate
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- 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 givenGuildDelete
gateway dispatch. This will typically perform a delete operation on a relatedGuildData
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 interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a
Mono
completing when the operation is done, optionally returning the old state of theGuildData
before the deletion
-
onGuildStickersUpdate
public Mono<Set<discord4j.discordjson.json.StickerData>> onGuildStickersUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildStickersUpdate dispatch) Description copied from interface:GatewayDataUpdater
Updates the internal state of the store according to the givenGuildStickersUpdate
gateway dispatch. This will typically perform an update operation on a related collection ofStickerData
that is already present in the store, and update the list returned byGuildData.stickers()
.- Specified by:
onGuildStickersUpdate
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a
Mono
completing when the operation is done, optionally returning the old state of the set ofStickerData
before the update
-
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 givenGuildEmojisUpdate
gateway dispatch. This will typically perform an update operation on a related collection ofEmojiData
that is already present in the store, and update the list returned byGuildData.emojis()
.- Specified by:
onGuildEmojisUpdate
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a
Mono
completing when the operation is done, optionally returning the old state of the set ofEmojiData
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 givenGuildMemberAdd
gateway dispatch. This will typically perform an insert operation on the relatedMemberData
, add the ID of the member into the list returned byGuildData.members()
, and increment the count returned byGuildCreateFields.memberCount()
.- Specified by:
onGuildMemberAdd
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- 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 givenGuildMemberRemove
gateway dispatch. This will typically perform a delete operation on the relatedMemberData
, remove the ID of the member from the list returned byGuildData.members()
, and decrement the count returned byGuildCreateFields.memberCount()
.- Specified by:
onGuildMemberRemove
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a
Mono
completing when the operation is done, optionally returning the old state of theMemberData
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 givenGuildMembersChunk
gateway dispatch. This will typically perform the same kind of operations thanGatewayDataUpdater.onGuildMemberAdd(int, GuildMemberAdd)
, but adapted for whole chunks of members.- Specified by:
onGuildMembersChunk
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- 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 givenGuildMemberUpdate
gateway dispatch. This will typically perform an update operation on a relatedMemberData
that is already present in the store.- Specified by:
onGuildMemberUpdate
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a
Mono
completing when the operation is done, optionally returning the old state of theMemberData
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 givenGuildRoleCreate
gateway dispatch. This will typically perform an insert operation on the relatedRoleData
, and add the role ID to the list returned byGuildData.roles()
.- Specified by:
onGuildRoleCreate
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- 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 givenGuildRoleDelete
gateway dispatch. This will typically perform a delete operation on a relatedRoleData
that is already present in the store, and remove the role ID from the list returned byGuildData.roles()
andPartialMemberData.roles()
.- Specified by:
onGuildRoleDelete
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a
Mono
completing when the operation is done, optionally returning the old state of theRoleData
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 givenGuildRoleUpdate
gateway dispatch. This will typically perform an update operation on a relatedRoleData
that is already present in the store.- Specified by:
onGuildRoleUpdate
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a
Mono
completing when the operation is done, optionally returning the old state of theRoleData
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 givenGuildUpdate
gateway dispatch. This will typically perform an update operation on a relatedGuildData
that is already present in the store.- Specified by:
onGuildUpdate
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a
Mono
completing when the operation is done, optionally returning the old state of theGuildData
before the update
-
onShardInvalidation
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 interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard to invalidatecause
- 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 givenMessageCreate
gateway dispatch. This will typically perform an insert operation on the relatedMessageData
, and update thelast_message_id
field of the channel where the message was sent in.- Specified by:
onMessageCreate
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- 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 givenMessageDelete
gateway dispatch. This will typically perform a delete operation on a relatedMessageData
that is already present in the store.- Specified by:
onMessageDelete
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a
Mono
completing when the operation is done, optionally returning the old state of theMessageData
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 givenMessageDeleteBulk
gateway dispatch. This will typically perform a delete operation on a related collection ofMessageData
that is already present in the store.- Specified by:
onMessageDeleteBulk
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a
Mono
completing when the operation is done, optionally returning the old state of the set ofMessageData
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 givenMessageReactionAdd
gateway dispatch. This will typically perform an update operation on a relatedMessageData
that is already present in the store in order to add the reaction.- Specified by:
onMessageReactionAdd
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- 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 givenMessageReactionRemove
gateway dispatch. This will typically perform an update operation on a relatedMessageData
that is already present in the store in order to remove the reaction.- Specified by:
onMessageReactionRemove
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- 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 givenMessageReactionRemoveAll
gateway dispatch. This will typically perform an update operation on a relatedMessageData
that is already present in the store in order to remove all reactions.- Specified by:
onMessageReactionRemoveAll
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- 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 givenMessageReactionRemoveEmoji
gateway dispatch. This will typically perform an update operation on a relatedMessageData
that is already present in the store in order to remove all reactions for a specific emoji.- Specified by:
onMessageReactionRemoveEmoji
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- 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 givenMessageUpdate
gateway dispatch. This will typically perform an update operation on a relatedMessageData
that is already present in the store.- Specified by:
onMessageUpdate
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a
Mono
completing when the operation is done, optionally returning the old state of theMessageData
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 givenPresenceUpdate
gateway dispatch. This will typically perform an insert or an update operation on the relatedPresenceData
, and update the relatedUserData
to reflect the new presence.- Specified by:
onPresenceUpdate
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a
Mono
completing when the operation is done, optionally returning the old state of both thePresenceData
and theUserData
before the update
-
onReady
Description copied from interface:GatewayDataUpdater
Updates the internal state of the store according to the givenReady
gateway dispatch. This will typically perform an insert operation on theUserData
that represents the self-user, and allocate the resources needed to receive further events happening on this shard index.- Specified by:
onReady
in interfaceGatewayDataUpdater
- Parameters:
dispatch
- the dispatch data coming from Discord gateway- Returns:
- a
Mono
completing when the operation is done
-
onStageInstanceCreate
public Mono<Void> onStageInstanceCreate(int shardIndex, discord4j.discordjson.json.gateway.StageInstanceCreate dispatch) Description copied from interface:GatewayDataUpdater
Updates the internal state of the store according to the givenStageInstanceCreate
gateway dispatch. This will typically perform an insert operation on the relatedStageInstanceData
.- Specified by:
onStageInstanceCreate
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a
Mono
completing when the operation is done
-
onStageInstanceUpdate
public Mono<discord4j.discordjson.json.StageInstanceData> onStageInstanceUpdate(int shardIndex, discord4j.discordjson.json.gateway.StageInstanceUpdate dispatch) Description copied from interface:GatewayDataUpdater
Updates the internal state of the store according to the givenStageInstanceCreate
gateway dispatch. This will typically perform an insert operation on the relatedStageInstanceData
that is already present in the store.- Specified by:
onStageInstanceUpdate
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a
Mono
completing when the operation is done, returning the old state of theStageInstanceData
before the update
-
onStageInstanceDelete
public Mono<discord4j.discordjson.json.StageInstanceData> onStageInstanceDelete(int shardIndex, discord4j.discordjson.json.gateway.StageInstanceDelete dispatch) Description copied from interface:GatewayDataUpdater
Updates the internal state of the store according to the givenStageInstanceCreate
gateway dispatch. This will typically perform an delete operation on the relatedStageInstanceData
that is already present in the store.- Specified by:
onStageInstanceDelete
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a
Mono
completing when the operation is done, returning the old state of theStageInstanceData
before the delete
-
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 givenUserUpdate
gateway dispatch. This will typically perform an update operation on a relatedUserData
that is already present in the store.- Specified by:
onUserUpdate
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a
Mono
completing when the operation is done, optionally returning the old state of theUserData
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 givenVoiceStateUpdateDispatch
gateway dispatch. This will typically perform an insert, update or delete operation on the relatedVoiceStateData
.- Specified by:
onVoiceStateUpdateDispatch
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a
Mono
completing when the operation is done, optionally returning the old state of theVoiceStateData
before the update
-
onGuildMembersCompletion
Description copied from interface:GatewayDataUpdater
Invoked to indicate that all members for the specified guild ID were received. It serves as a hint to indicate to the store that information on the full member list for this specific guild may now be accurately returned, so that further calls toDataAccessor.countExactMembersInGuild(long)
andDataAccessor.getExactMembersInGuild(long)
with the same guild ID no longer fail.- Specified by:
onGuildMembersCompletion
in interfaceGatewayDataUpdater
- Parameters:
guildId
- the guild ID- Returns:
- a
Mono
completing when the operation is done
-
onThreadCreate
public Mono<Void> onThreadCreate(int shardIndex, discord4j.discordjson.json.gateway.ThreadCreate dispatch) Description copied from interface:GatewayDataUpdater
Updates the internal state of the store according to the givenThreadCreate
gateway dispatch. This will typically perform an insert operation on the relatedChannelData
.- Specified by:
onThreadCreate
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a
Mono
completing when the operation is done
-
onThreadUpdate
public Mono<discord4j.discordjson.json.ChannelData> onThreadUpdate(int shardIndex, discord4j.discordjson.json.gateway.ThreadUpdate dispatch) Description copied from interface:GatewayDataUpdater
Updates the internal state of the store according to the givenThreadUpdate
gateway dispatch. This will typically perform an update operation on a relatedChannelData
that is already present in the store.- Specified by:
onThreadUpdate
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a
Mono
completing when the operation is done, optionally returning the old state of theChannelData
before the update
-
onThreadDelete
public Mono<Void> onThreadDelete(int shardIndex, discord4j.discordjson.json.gateway.ThreadDelete dispatch) Description copied from interface:GatewayDataUpdater
Updates the internal state of the store according to the givenThreadDelete
gateway dispatch. This will typically perform a delete operation on a relatedChannelData
that is already present in the store.- Specified by:
onThreadDelete
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a
Mono
completing when the operation is done
-
onThreadListSync
public Mono<Void> onThreadListSync(int shardIndex, discord4j.discordjson.json.gateway.ThreadListSync dispatch) Description copied from interface:GatewayDataUpdater
Updates the internal state of the store according to the givenThreadListSync
gateway dispatch. This will typically perform an update and delete operation on the relatedChannelData
andThreadMemberData
.- Specified by:
onThreadListSync
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a
Mono
completing when the operation is done
-
onThreadMemberUpdate
public Mono<discord4j.discordjson.json.ThreadMemberData> onThreadMemberUpdate(int shardIndex, discord4j.discordjson.json.gateway.ThreadMemberUpdate dispatch) Description copied from interface:GatewayDataUpdater
Updates the internal state of the store according to the givenThreadMemberUpdate
gateway dispatch. This will typically perform a delete operation on a relatedThreadMemberData
that is already present in the store.- Specified by:
onThreadMemberUpdate
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a
Mono
completing when the operation is done, optionally returning the old state of theThreadMemberUpdate
before the deletion
-
onThreadMembersUpdate
public Mono<List<discord4j.discordjson.json.ThreadMemberData>> onThreadMembersUpdate(int shardIndex, discord4j.discordjson.json.gateway.ThreadMembersUpdate dispatch) Description copied from interface:GatewayDataUpdater
Updates the internal state of the store according to the givenThreadMembersUpdate
gateway dispatch. This will typically perform a delete operation on a relatedThreadMemberData
that is already present in the store.- Specified by:
onThreadMembersUpdate
in interfaceGatewayDataUpdater
- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a
Mono
completing when the operation is done, optionally returning the old state of the list ofThreadMemberData
before the deletion
-