Class GatewayActions
java.lang.Object
discord4j.common.store.action.gateway.GatewayActions
Provides static factories to obtain
StoreAction
instances that enable updating data in a store in response
to an event received from the Discord gateway.-
Method Summary
Modifier and TypeMethodDescriptionstatic ChannelCreateAction
channelCreate
(int shardIndex, discord4j.discordjson.json.gateway.ChannelCreate dispatch) Creates an action to execute when aChannelCreate
is received from the gateway.static ChannelDeleteAction
channelDelete
(int shardIndex, discord4j.discordjson.json.gateway.ChannelDelete dispatch) Creates an action to execute when aChannelDelete
is received from the gateway.static ChannelUpdateAction
channelUpdate
(int shardIndex, discord4j.discordjson.json.gateway.ChannelUpdate dispatch) Creates an action to execute when aChannelUpdate
is received from the gateway.static CompleteGuildMembersAction
completeGuildMembers
(long guildId) Creates an action that allows to signal that the full member list for the specified guild has been received.static GuildCreateAction
guildCreate
(int shardIndex, discord4j.discordjson.json.gateway.GuildCreate dispatch) Creates an action to execute when aGuildCreate
is received from the gateway.static GuildDeleteAction
guildDelete
(int shardIndex, discord4j.discordjson.json.gateway.GuildDelete dispatch) Creates an action to execute when aGuildDelete
is received from the gateway.static GuildEmojisUpdateAction
guildEmojisUpdate
(int shardIndex, discord4j.discordjson.json.gateway.GuildEmojisUpdate dispatch) Creates an action to execute when aGuildEmojisUpdate
is received from the gateway.static GuildMemberAddAction
guildMemberAdd
(int shardIndex, discord4j.discordjson.json.gateway.GuildMemberAdd dispatch) Creates an action to execute when aGuildMemberAdd
is received from the gateway.static GuildMemberRemoveAction
guildMemberRemove
(int shardIndex, discord4j.discordjson.json.gateway.GuildMemberRemove dispatch) Creates an action to execute when aGuildMemberRemove
is received from the gateway.static GuildMembersChunkAction
guildMembersChunk
(int shardIndex, discord4j.discordjson.json.gateway.GuildMembersChunk dispatch) Creates an action to execute when aGuildMembersChunk
is received from the gateway.static GuildMemberUpdateAction
guildMemberUpdate
(int shardIndex, discord4j.discordjson.json.gateway.GuildMemberUpdate dispatch) Creates an action to execute when aGuildMemberUpdate
is received from the gateway.static GuildRoleCreateAction
guildRoleCreate
(int shardIndex, discord4j.discordjson.json.gateway.GuildRoleCreate dispatch) Creates an action to execute when aGuildRoleCreate
is received from the gateway.static GuildRoleDeleteAction
guildRoleDelete
(int shardIndex, discord4j.discordjson.json.gateway.GuildRoleDelete dispatch) Creates an action to execute when aGuildRoleDelete
is received from the gateway.static GuildRoleUpdateAction
guildRoleUpdate
(int shardIndex, discord4j.discordjson.json.gateway.GuildRoleUpdate dispatch) Creates an action to execute when aGuildRoleUpdate
is received from the gateway.static GuildStickersUpdateAction
guildStickersUpdate
(int shardIndex, discord4j.discordjson.json.gateway.GuildStickersUpdate dispatch) Creates an action to execute when aGuildStickersUpdate
is received from the gateway.static GuildUpdateAction
guildUpdate
(int shardIndex, discord4j.discordjson.json.gateway.GuildUpdate dispatch) Creates an action to execute when aGuildUpdate
is received from the gateway.static InvalidateShardAction
invalidateShard
(int shardIndex, InvalidationCause cause) Creates an action to execute when a shard should be invalidated.static MessageCreateAction
messageCreate
(int shardIndex, discord4j.discordjson.json.gateway.MessageCreate dispatch) Creates an action to execute when aMessageCreate
is received from the gateway.static MessageDeleteAction
messageDelete
(int shardIndex, discord4j.discordjson.json.gateway.MessageDelete dispatch) Creates an action to execute when aMessageDelete
is received from the gateway.static MessageDeleteBulkAction
messageDeleteBulk
(int shardIndex, discord4j.discordjson.json.gateway.MessageDeleteBulk dispatch) Creates an action to execute when aMessageDeleteBulk
is received from the gateway.static MessageReactionAddAction
messageReactionAdd
(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionAdd dispatch) Creates an action to execute when aMessageReactionAdd
is received from the gateway.static MessageReactionRemoveAction
messageReactionRemove
(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemove dispatch) Creates an action to execute when aMessageReactionRemove
is received from the gateway.messageReactionRemoveAll
(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemoveAll dispatch) Creates an action to execute when aMessageReactionRemoveAll
is received from the gateway.messageReactionRemoveEmoji
(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemoveEmoji dispatch) Creates an action to execute when aMessageReactionRemoveEmoji
is received from the gateway.static MessageUpdateAction
messageUpdate
(int shardIndex, discord4j.discordjson.json.gateway.MessageUpdate dispatch) Creates an action to execute when aMessageUpdate
is received from the gateway.static PresenceUpdateAction
presenceUpdate
(int shardIndex, discord4j.discordjson.json.gateway.PresenceUpdate dispatch) Creates an action to execute when aPresenceUpdate
is received from the gateway.static ReadyAction
ready
(discord4j.discordjson.json.gateway.Ready dispatch) Creates an action to execute when aReady
is received from the gateway.static ThreadCreateAction
threadCreate
(int shardIndex, discord4j.discordjson.json.gateway.ThreadCreate dispatch) Creates an action to execute when aThreadCreate
is received from the gateway.static ThreadDeleteAction
threadDelete
(int shardIndex, discord4j.discordjson.json.gateway.ThreadDelete dispatch) Creates an action to execute when aThreadDelete
is received from the gateway.static ThreadListSyncAction
threadListSync
(int shardIndex, discord4j.discordjson.json.gateway.ThreadListSync dispatch) Creates an action to execute when aThreadListSync
is received from the gateway.static ThreadMembersUpdateAction
threadMembersUpdate
(int shardIndex, discord4j.discordjson.json.gateway.ThreadMembersUpdate dispatch) Creates an action to execute when aThreadMembersUpdate
is received from the gateway.static ThreadMemberUpdateAction
threadMemberUpdate
(int shardIndex, discord4j.discordjson.json.gateway.ThreadMemberUpdate dispatch) Creates an action to execute when aThreadMemberUpdate
is received from the gateway.static ThreadUpdateAction
threadUpdate
(int shardIndex, discord4j.discordjson.json.gateway.ThreadUpdate dispatch) Creates an action to execute when aThreadUpdate
is received from the gateway.static UserUpdateAction
userUpdate
(int shardIndex, discord4j.discordjson.json.gateway.UserUpdate dispatch) Creates an action to execute when aUserUpdate
is received from the gateway.voiceStateUpdateDispatch
(int shardIndex, discord4j.discordjson.json.gateway.VoiceStateUpdateDispatch dispatch) Creates an action to execute when aVoiceStateUpdateDispatch
is received from the gateway.
-
Method Details
-
channelCreate
public static ChannelCreateAction channelCreate(int shardIndex, discord4j.discordjson.json.gateway.ChannelCreate dispatch) Creates an action to execute when aChannelCreate
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
ChannelCreateAction
-
channelDelete
public static ChannelDeleteAction channelDelete(int shardIndex, discord4j.discordjson.json.gateway.ChannelDelete dispatch) Creates an action to execute when aChannelDelete
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
ChannelDeleteAction
-
channelUpdate
public static ChannelUpdateAction channelUpdate(int shardIndex, discord4j.discordjson.json.gateway.ChannelUpdate dispatch) Creates an action to execute when aChannelUpdate
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
ChannelUpdateAction
-
guildCreate
public static GuildCreateAction guildCreate(int shardIndex, discord4j.discordjson.json.gateway.GuildCreate dispatch) Creates an action to execute when aGuildCreate
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
GuildCreateAction
-
guildDelete
public static GuildDeleteAction guildDelete(int shardIndex, discord4j.discordjson.json.gateway.GuildDelete dispatch) Creates an action to execute when aGuildDelete
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
GuildDeleteAction
-
guildStickersUpdate
public static GuildStickersUpdateAction guildStickersUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildStickersUpdate dispatch) Creates an action to execute when aGuildStickersUpdate
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
GuildStickersUpdateAction
-
guildEmojisUpdate
public static GuildEmojisUpdateAction guildEmojisUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildEmojisUpdate dispatch) Creates an action to execute when aGuildEmojisUpdate
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
GuildEmojisUpdateAction
-
guildMemberAdd
public static GuildMemberAddAction guildMemberAdd(int shardIndex, discord4j.discordjson.json.gateway.GuildMemberAdd dispatch) Creates an action to execute when aGuildMemberAdd
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
GuildMemberAddAction
-
guildMemberRemove
public static GuildMemberRemoveAction guildMemberRemove(int shardIndex, discord4j.discordjson.json.gateway.GuildMemberRemove dispatch) Creates an action to execute when aGuildMemberRemove
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
GuildMemberRemoveAction
-
guildMembersChunk
public static GuildMembersChunkAction guildMembersChunk(int shardIndex, discord4j.discordjson.json.gateway.GuildMembersChunk dispatch) Creates an action to execute when aGuildMembersChunk
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
GuildMembersChunkAction
-
guildMemberUpdate
public static GuildMemberUpdateAction guildMemberUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildMemberUpdate dispatch) Creates an action to execute when aGuildMemberUpdate
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
GuildMemberUpdateAction
-
guildRoleCreate
public static GuildRoleCreateAction guildRoleCreate(int shardIndex, discord4j.discordjson.json.gateway.GuildRoleCreate dispatch) Creates an action to execute when aGuildRoleCreate
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
GuildRoleCreateAction
-
guildRoleDelete
public static GuildRoleDeleteAction guildRoleDelete(int shardIndex, discord4j.discordjson.json.gateway.GuildRoleDelete dispatch) Creates an action to execute when aGuildRoleDelete
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
GuildRoleDeleteAction
-
guildRoleUpdate
public static GuildRoleUpdateAction guildRoleUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildRoleUpdate dispatch) Creates an action to execute when aGuildRoleUpdate
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
GuildRoleUpdateAction
-
guildUpdate
public static GuildUpdateAction guildUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildUpdate dispatch) Creates an action to execute when aGuildUpdate
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
GuildUpdateAction
-
invalidateShard
Creates an action to execute when a shard should be invalidated.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromcause
- the cause of the invalidation- Returns:
- a new
InvalidateShardAction
-
messageCreate
public static MessageCreateAction messageCreate(int shardIndex, discord4j.discordjson.json.gateway.MessageCreate dispatch) Creates an action to execute when aMessageCreate
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
MessageCreateAction
-
messageDelete
public static MessageDeleteAction messageDelete(int shardIndex, discord4j.discordjson.json.gateway.MessageDelete dispatch) Creates an action to execute when aMessageDelete
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
MessageDeleteAction
-
messageDeleteBulk
public static MessageDeleteBulkAction messageDeleteBulk(int shardIndex, discord4j.discordjson.json.gateway.MessageDeleteBulk dispatch) Creates an action to execute when aMessageDeleteBulk
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
MessageDeleteBulkAction
-
messageReactionAdd
public static MessageReactionAddAction messageReactionAdd(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionAdd dispatch) Creates an action to execute when aMessageReactionAdd
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
MessageReactionAddAction
-
messageReactionRemove
public static MessageReactionRemoveAction messageReactionRemove(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemove dispatch) Creates an action to execute when aMessageReactionRemove
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
MessageReactionRemoveAction
-
messageReactionRemoveAll
public static MessageReactionRemoveAllAction messageReactionRemoveAll(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemoveAll dispatch) Creates an action to execute when aMessageReactionRemoveAll
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
MessageReactionRemoveAllAction
-
messageReactionRemoveEmoji
public static MessageReactionRemoveEmojiAction messageReactionRemoveEmoji(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemoveEmoji dispatch) Creates an action to execute when aMessageReactionRemoveEmoji
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
MessageReactionRemoveEmojiAction
-
messageUpdate
public static MessageUpdateAction messageUpdate(int shardIndex, discord4j.discordjson.json.gateway.MessageUpdate dispatch) Creates an action to execute when aMessageUpdate
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
MessageUpdateAction
-
presenceUpdate
public static PresenceUpdateAction presenceUpdate(int shardIndex, discord4j.discordjson.json.gateway.PresenceUpdate dispatch) Creates an action to execute when aPresenceUpdate
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
PresenceUpdateAction
-
ready
Creates an action to execute when aReady
is received from the gateway.- Parameters:
dispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
ReadyAction
-
userUpdate
public static UserUpdateAction userUpdate(int shardIndex, discord4j.discordjson.json.gateway.UserUpdate dispatch) Creates an action to execute when aUserUpdate
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
UserUpdateAction
-
voiceStateUpdateDispatch
public static VoiceStateUpdateDispatchAction voiceStateUpdateDispatch(int shardIndex, discord4j.discordjson.json.gateway.VoiceStateUpdateDispatch dispatch) Creates an action to execute when aVoiceStateUpdateDispatch
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
VoiceStateUpdateDispatchAction
-
completeGuildMembers
Creates an action that allows to signal that the full member list for the specified guild has been received.- Parameters:
guildId
- the guild ID- Returns:
- a new
CompleteGuildMembersAction
-
threadCreate
public static ThreadCreateAction threadCreate(int shardIndex, discord4j.discordjson.json.gateway.ThreadCreate dispatch) Creates an action to execute when aThreadCreate
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
ThreadCreateAction
-
threadUpdate
public static ThreadUpdateAction threadUpdate(int shardIndex, discord4j.discordjson.json.gateway.ThreadUpdate dispatch) Creates an action to execute when aThreadUpdate
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
ThreadUpdateAction
-
threadDelete
public static ThreadDeleteAction threadDelete(int shardIndex, discord4j.discordjson.json.gateway.ThreadDelete dispatch) Creates an action to execute when aThreadDelete
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
ThreadDeleteAction
-
threadListSync
public static ThreadListSyncAction threadListSync(int shardIndex, discord4j.discordjson.json.gateway.ThreadListSync dispatch) Creates an action to execute when aThreadListSync
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
ThreadListSyncAction
-
threadMemberUpdate
public static ThreadMemberUpdateAction threadMemberUpdate(int shardIndex, discord4j.discordjson.json.gateway.ThreadMemberUpdate dispatch) Creates an action to execute when aThreadMemberUpdate
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
ThreadMemberUpdateAction
-
threadMembersUpdate
public static ThreadMembersUpdateAction threadMembersUpdate(int shardIndex, discord4j.discordjson.json.gateway.ThreadMembersUpdate dispatch) Creates an action to execute when aThreadMembersUpdate
is received from the gateway.- Parameters:
shardIndex
- the index of the shard where the dispatch comes fromdispatch
- the dispatch data coming from Discord gateway- Returns:
- a new
ThreadMembersUpdateAction
-