Interface GatewayDataUpdater
- All Known Implementing Classes:
LegacyStoreLayout,LocalStoreLayout
public interface GatewayDataUpdater
Defines methods to handle update operations in response to events received from the Discord gateway.
-
Method Summary
Modifier and TypeMethodDescriptiononChannelCreate(int shardIndex, discord4j.discordjson.json.gateway.ChannelCreate dispatch) Updates the internal state of the store according to the givenChannelCreategateway 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 givenChannelDeletegateway 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 givenChannelUpdategateway dispatch.onGuildCreate(int shardIndex, discord4j.discordjson.json.gateway.GuildCreate dispatch) Updates the internal state of the store according to the givenGuildCreategateway 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 givenGuildDeletegateway dispatch.onGuildEmojisUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildEmojisUpdate dispatch) Updates the internal state of the store according to the givenGuildEmojisUpdategateway dispatch.onGuildMemberAdd(int shardIndex, discord4j.discordjson.json.gateway.GuildMemberAdd dispatch) Updates the internal state of the store according to the givenGuildMemberAddgateway 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 givenGuildMemberRemovegateway dispatch.onGuildMembersChunk(int shardIndex, discord4j.discordjson.json.gateway.GuildMembersChunk dispatch) Updates the internal state of the store according to the givenGuildMembersChunkgateway 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 givenGuildMemberUpdategateway dispatch.onGuildRoleCreate(int shardIndex, discord4j.discordjson.json.gateway.GuildRoleCreate dispatch) Updates the internal state of the store according to the givenGuildRoleCreategateway 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 givenGuildRoleDeletegateway 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 givenGuildRoleUpdategateway dispatch.onGuildScheduledEventCreate(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventCreate dispatch) Updates the internal state of the store according to theGuildScheduledEventCreategateway dispatch.Mono<discord4j.discordjson.json.GuildScheduledEventData>onGuildScheduledEventDelete(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventDelete dispatch) Updates the internal state of the store according to theGuildScheduledEventDeletegateway dispatch.Mono<discord4j.discordjson.json.GuildScheduledEventData>onGuildScheduledEventUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventUpdate dispatch) Updates the internal state of the store according to theGuildScheduledEventUpdategateway dispatch.onGuildScheduledEventUserAdd(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventUserAdd dispatch) Updates the internal state of the store according to theGuildScheduledEventUserAddgateway dispatch.onGuildScheduledEventUserRemove(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventUserRemove dispatch) Updates the internal state of the store according to theGuildScheduledEventUserRemovegateway dispatch.onGuildStickersUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildStickersUpdate dispatch) Updates the internal state of the store according to the givenGuildStickersUpdategateway 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 givenGuildUpdategateway dispatch.onMessageCreate(int shardIndex, discord4j.discordjson.json.gateway.MessageCreate dispatch) Updates the internal state of the store according to the givenMessageCreategateway 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 givenMessageDeletegateway dispatch.onMessageDeleteBulk(int shardIndex, discord4j.discordjson.json.gateway.MessageDeleteBulk dispatch) Updates the internal state of the store according to the givenMessageDeleteBulkgateway dispatch.onMessageReactionAdd(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionAdd dispatch) Updates the internal state of the store according to the givenMessageReactionAddgateway dispatch.onMessageReactionRemove(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemove dispatch) Updates the internal state of the store according to the givenMessageReactionRemovegateway dispatch.onMessageReactionRemoveAll(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemoveAll dispatch) Updates the internal state of the store according to the givenMessageReactionRemoveAllgateway dispatch.onMessageReactionRemoveEmoji(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemoveEmoji dispatch) Updates the internal state of the store according to the givenMessageReactionRemoveEmojigateway 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 givenMessageUpdategateway dispatch.onPresenceUpdate(int shardIndex, discord4j.discordjson.json.gateway.PresenceUpdate dispatch) Updates the internal state of the store according to the givenPresenceUpdategateway dispatch.onReady(discord4j.discordjson.json.gateway.Ready dispatch) Updates the internal state of the store according to the givenReadygateway 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 givenStageInstanceCreategateway 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 givenStageInstanceCreategateway 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 givenStageInstanceCreategateway dispatch.onThreadCreate(int shardIndex, discord4j.discordjson.json.gateway.ThreadCreate dispatch) Updates the internal state of the store according to the givenThreadCreategateway dispatch.onThreadDelete(int shardIndex, discord4j.discordjson.json.gateway.ThreadDelete dispatch) Updates the internal state of the store according to the givenThreadDeletegateway dispatch.onThreadListSync(int shardIndex, discord4j.discordjson.json.gateway.ThreadListSync dispatch) Updates the internal state of the store according to the givenThreadListSyncgateway dispatch.onThreadMembersUpdate(int shardIndex, discord4j.discordjson.json.gateway.ThreadMembersUpdate dispatch) Updates the internal state of the store according to the givenThreadMembersUpdategateway 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 givenThreadMemberUpdategateway 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 givenThreadUpdategateway 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 givenUserUpdategateway 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 givenVoiceStateUpdateDispatchgateway dispatch.
-
Method Details
-
onChannelCreate
Mono<Void> onChannelCreate(int shardIndex, discord4j.discordjson.json.gateway.ChannelCreate dispatch) Updates the internal state of the store according to the givenChannelCreategateway dispatch. This will typically perform an insert operation on the relatedChannelData, and add the ID to the list returned byGuildData.channels()if applicable.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onChannelDelete
Mono<discord4j.discordjson.json.ChannelData> onChannelDelete(int shardIndex, discord4j.discordjson.json.gateway.ChannelDelete dispatch) Updates the internal state of the store according to the givenChannelDeletegateway dispatch. This will typically perform a delete operation on a relatedChannelDatathat is already present in the store, and remove the ID from the list returned byGuildData.channels()if applicable.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of theChannelDatabefore the deletion
-
onChannelUpdate
Mono<discord4j.discordjson.json.ChannelData> onChannelUpdate(int shardIndex, discord4j.discordjson.json.gateway.ChannelUpdate dispatch) Updates the internal state of the store according to the givenChannelUpdategateway dispatch. This will typically perform an update operation on a relatedChannelDatathat is already present in the store.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of theChannelDatabefore the update
-
onGuildCreate
Updates the internal state of the store according to the givenGuildCreategateway 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.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onGuildDelete
Mono<discord4j.discordjson.json.GuildData> onGuildDelete(int shardIndex, discord4j.discordjson.json.gateway.GuildDelete dispatch) Updates the internal state of the store according to the givenGuildDeletegateway dispatch. This will typically perform a delete operation on a relatedGuildDatathat 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.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of theGuildDatabefore the deletion
-
onGuildStickersUpdate
Mono<Set<discord4j.discordjson.json.StickerData>> onGuildStickersUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildStickersUpdate dispatch) Updates the internal state of the store according to the givenGuildStickersUpdategateway dispatch. This will typically perform an update operation on a related collection ofStickerDatathat is already present in the store, and update the list returned byGuildData.stickers().- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of the set ofStickerDatabefore the update
-
onGuildEmojisUpdate
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 givenGuildEmojisUpdategateway dispatch. This will typically perform an update operation on a related collection ofEmojiDatathat is already present in the store, and update the list returned byGuildData.emojis().- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of the set ofEmojiDatabefore the update
-
onGuildMemberAdd
Mono<Void> onGuildMemberAdd(int shardIndex, discord4j.discordjson.json.gateway.GuildMemberAdd dispatch) Updates the internal state of the store according to the givenGuildMemberAddgateway 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().- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onGuildMemberRemove
Mono<discord4j.discordjson.json.MemberData> onGuildMemberRemove(int shardIndex, discord4j.discordjson.json.gateway.GuildMemberRemove dispatch) Updates the internal state of the store according to the givenGuildMemberRemovegateway 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().- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of theMemberDatabefore the deletion
-
onGuildMembersChunk
Mono<Void> onGuildMembersChunk(int shardIndex, discord4j.discordjson.json.gateway.GuildMembersChunk dispatch) Updates the internal state of the store according to the givenGuildMembersChunkgateway dispatch. This will typically perform the same kind of operations thanonGuildMemberAdd(int, GuildMemberAdd), but adapted for whole chunks of members.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onGuildMemberUpdate
Mono<discord4j.discordjson.json.MemberData> onGuildMemberUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildMemberUpdate dispatch) Updates the internal state of the store according to the givenGuildMemberUpdategateway dispatch. This will typically perform an update operation on a relatedMemberDatathat is already present in the store.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of theMemberDatabefore the update
-
onGuildRoleCreate
Mono<Void> onGuildRoleCreate(int shardIndex, discord4j.discordjson.json.gateway.GuildRoleCreate dispatch) Updates the internal state of the store according to the givenGuildRoleCreategateway dispatch. This will typically perform an insert operation on the relatedRoleData, and add the role ID to the list returned byGuildData.roles().- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onGuildRoleDelete
Mono<discord4j.discordjson.json.RoleData> onGuildRoleDelete(int shardIndex, discord4j.discordjson.json.gateway.GuildRoleDelete dispatch) Updates the internal state of the store according to the givenGuildRoleDeletegateway dispatch. This will typically perform a delete operation on a relatedRoleDatathat is already present in the store, and remove the role ID from the list returned byGuildData.roles()andPartialMemberData.roles().- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of theRoleDatabefore the deletion
-
onGuildRoleUpdate
Mono<discord4j.discordjson.json.RoleData> onGuildRoleUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildRoleUpdate dispatch) Updates the internal state of the store according to the givenGuildRoleUpdategateway dispatch. This will typically perform an update operation on a relatedRoleDatathat is already present in the store.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of theRoleDatabefore the update
-
onGuildScheduledEventCreate
Mono<Void> onGuildScheduledEventCreate(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventCreate dispatch) Updates the internal state of the store according to theGuildScheduledEventCreategateway dispatch. This will typically perform an insert operation on a newGuildScheduledEventDatain the store.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onGuildScheduledEventUpdate
Mono<discord4j.discordjson.json.GuildScheduledEventData> onGuildScheduledEventUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventUpdate dispatch) Updates the internal state of the store according to theGuildScheduledEventUpdategateway dispatch. This will typically perform an update operation on a relatedGuildScheduledEventDataalready present in the store.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returningGuildScheduledEventDatain a state before the update
-
onGuildScheduledEventDelete
Mono<discord4j.discordjson.json.GuildScheduledEventData> onGuildScheduledEventDelete(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventDelete dispatch) Updates the internal state of the store according to theGuildScheduledEventDeletegateway dispatch. This will typically perform a delete operation on a relatedGuildScheduledEventDatain the store, if present.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning theGuildScheduledEventDatain a state before the deletion.
-
onGuildScheduledEventUserAdd
Mono<Void> onGuildScheduledEventUserAdd(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventUserAdd dispatch) Updates the internal state of the store according to theGuildScheduledEventUserAddgateway dispatch. This will typically perform an insert operation on a relatedListhandling a relationship between aGuildScheduledEventDataand the providedGuildScheduledEventUserData.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onGuildScheduledEventUserRemove
Mono<Void> onGuildScheduledEventUserRemove(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventUserRemove dispatch) Updates the internal state of the store according to theGuildScheduledEventUserRemovegateway dispatch. This will typically perform a delete operation on a relatedListhandling a relationship between aGuildScheduledEventDataand the providedGuildScheduledEventUserData.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onGuildUpdate
Mono<discord4j.discordjson.json.GuildData> onGuildUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildUpdate dispatch) Updates the internal state of the store according to the givenGuildUpdategateway dispatch. This will typically perform an update operation on a relatedGuildDatathat is already present in the store.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of theGuildDatabefore the update
-
onShardInvalidation
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.- Parameters:
shardIndex- the index of the shard to invalidatecause- the cause of the invalidation- Returns:
- a
Monocompleting when the operation is done
-
onMessageCreate
Mono<Void> onMessageCreate(int shardIndex, discord4j.discordjson.json.gateway.MessageCreate dispatch) Updates the internal state of the store according to the givenMessageCreategateway dispatch. This will typically perform an insert operation on the relatedMessageData, and update thelast_message_idfield of the channel where the message was sent in.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onMessageDelete
Mono<discord4j.discordjson.json.MessageData> onMessageDelete(int shardIndex, discord4j.discordjson.json.gateway.MessageDelete dispatch) Updates the internal state of the store according to the givenMessageDeletegateway dispatch. This will typically perform a delete operation on a relatedMessageDatathat is already present in the store.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of theMessageDatabefore the deletion
-
onMessageDeleteBulk
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 givenMessageDeleteBulkgateway dispatch. This will typically perform a delete operation on a related collection ofMessageDatathat is already present in the store.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of the set ofMessageDatabefore the deletion
-
onMessageReactionAdd
Mono<Void> onMessageReactionAdd(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionAdd dispatch) Updates the internal state of the store according to the givenMessageReactionAddgateway dispatch. This will typically perform an update operation on a relatedMessageDatathat is already present in the store in order to add the reaction.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onMessageReactionRemove
Mono<Void> onMessageReactionRemove(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemove dispatch) Updates the internal state of the store according to the givenMessageReactionRemovegateway dispatch. This will typically perform an update operation on a relatedMessageDatathat is already present in the store in order to remove the reaction.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onMessageReactionRemoveAll
Mono<Void> onMessageReactionRemoveAll(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemoveAll dispatch) Updates the internal state of the store according to the givenMessageReactionRemoveAllgateway dispatch. This will typically perform an update operation on a relatedMessageDatathat is already present in the store in order to remove all reactions.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onMessageReactionRemoveEmoji
Mono<Void> onMessageReactionRemoveEmoji(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemoveEmoji dispatch) Updates the internal state of the store according to the givenMessageReactionRemoveEmojigateway dispatch. This will typically perform an update operation on a relatedMessageDatathat is already present in the store in order to remove all reactions for a specific emoji.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onMessageUpdate
Mono<discord4j.discordjson.json.MessageData> onMessageUpdate(int shardIndex, discord4j.discordjson.json.gateway.MessageUpdate dispatch) Updates the internal state of the store according to the givenMessageUpdategateway dispatch. This will typically perform an update operation on a relatedMessageDatathat is already present in the store.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of theMessageDatabefore the update
-
onPresenceUpdate
Mono<PresenceAndUserData> onPresenceUpdate(int shardIndex, discord4j.discordjson.json.gateway.PresenceUpdate dispatch) Updates the internal state of the store according to the givenPresenceUpdategateway dispatch. This will typically perform an insert or an update operation on the relatedPresenceData, and update the relatedUserDatato reflect the new presence.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of both thePresenceDataand theUserDatabefore the update
-
onReady
Updates the internal state of the store according to the givenReadygateway dispatch. This will typically perform an insert operation on theUserDatathat represents the self-user, and allocate the resources needed to receive further events happening on this shard index.- Parameters:
dispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onStageInstanceCreate
Mono<Void> onStageInstanceCreate(int shardIndex, discord4j.discordjson.json.gateway.StageInstanceCreate dispatch) Updates the internal state of the store according to the givenStageInstanceCreategateway dispatch. This will typically perform an insert operation on the relatedStageInstanceData.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onStageInstanceUpdate
Mono<discord4j.discordjson.json.StageInstanceData> onStageInstanceUpdate(int shardIndex, discord4j.discordjson.json.gateway.StageInstanceUpdate dispatch) Updates the internal state of the store according to the givenStageInstanceCreategateway dispatch. This will typically perform an insert operation on the relatedStageInstanceDatathat is already present in the store.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, returning the old state of theStageInstanceDatabefore the update
-
onStageInstanceDelete
Mono<discord4j.discordjson.json.StageInstanceData> onStageInstanceDelete(int shardIndex, discord4j.discordjson.json.gateway.StageInstanceDelete dispatch) Updates the internal state of the store according to the givenStageInstanceCreategateway dispatch. This will typically perform an delete operation on the relatedStageInstanceDatathat is already present in the store.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, returning the old state of theStageInstanceDatabefore the delete
-
onUserUpdate
Mono<discord4j.discordjson.json.UserData> onUserUpdate(int shardIndex, discord4j.discordjson.json.gateway.UserUpdate dispatch) Updates the internal state of the store according to the givenUserUpdategateway dispatch. This will typically perform an update operation on a relatedUserDatathat is already present in the store.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of theUserDatabefore the update
-
onVoiceStateUpdateDispatch
Mono<discord4j.discordjson.json.VoiceStateData> onVoiceStateUpdateDispatch(int shardIndex, discord4j.discordjson.json.gateway.VoiceStateUpdateDispatch dispatch) Updates the internal state of the store according to the givenVoiceStateUpdateDispatchgateway dispatch. This will typically perform an insert, update or delete operation on the relatedVoiceStateData.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of theVoiceStateDatabefore the update
-
onGuildMembersCompletion
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.- Parameters:
guildId- the guild ID- Returns:
- a
Monocompleting when the operation is done
-
onThreadCreate
Updates the internal state of the store according to the givenThreadCreategateway dispatch. This will typically perform an insert operation on the relatedChannelData.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onThreadUpdate
Mono<discord4j.discordjson.json.ChannelData> onThreadUpdate(int shardIndex, discord4j.discordjson.json.gateway.ThreadUpdate dispatch) Updates the internal state of the store according to the givenThreadUpdategateway dispatch. This will typically perform an update operation on a relatedChannelDatathat is already present in the store.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of theChannelDatabefore the update
-
onThreadDelete
Updates the internal state of the store according to the givenThreadDeletegateway dispatch. This will typically perform a delete operation on a relatedChannelDatathat is already present in the store.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onThreadListSync
Mono<Void> onThreadListSync(int shardIndex, discord4j.discordjson.json.gateway.ThreadListSync dispatch) Updates the internal state of the store according to the givenThreadListSyncgateway dispatch. This will typically perform an update and delete operation on the relatedChannelDataandThreadMemberData.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onThreadMemberUpdate
Mono<discord4j.discordjson.json.ThreadMemberData> onThreadMemberUpdate(int shardIndex, discord4j.discordjson.json.gateway.ThreadMemberUpdate dispatch) Updates the internal state of the store according to the givenThreadMemberUpdategateway dispatch. This will typically perform a delete operation on a relatedThreadMemberDatathat is already present in the store.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of theThreadMemberUpdatebefore the deletion
-
onThreadMembersUpdate
Mono<List<discord4j.discordjson.json.ThreadMemberData>> onThreadMembersUpdate(int shardIndex, discord4j.discordjson.json.gateway.ThreadMembersUpdate dispatch) Updates the internal state of the store according to the givenThreadMembersUpdategateway dispatch. This will typically perform a delete operation on a relatedThreadMemberDatathat is already present in the store.- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of the list ofThreadMemberDatabefore the deletion
-