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 ChannelCreateActionchannelCreate(int shardIndex, discord4j.discordjson.json.gateway.ChannelCreate dispatch) Creates an action to execute when aChannelCreateis received from the gateway.static ChannelDeleteActionchannelDelete(int shardIndex, discord4j.discordjson.json.gateway.ChannelDelete dispatch) Creates an action to execute when aChannelDeleteis received from the gateway.static ChannelUpdateActionchannelUpdate(int shardIndex, discord4j.discordjson.json.gateway.ChannelUpdate dispatch) Creates an action to execute when aChannelUpdateis received from the gateway.static CompleteGuildMembersActioncompleteGuildMembers(long guildId) Creates an action that allows to signal that the full member list for the specified guild has been received.static GuildCreateActionguildCreate(int shardIndex, discord4j.discordjson.json.gateway.GuildCreate dispatch) Creates an action to execute when aGuildCreateis received from the gateway.static GuildDeleteActionguildDelete(int shardIndex, discord4j.discordjson.json.gateway.GuildDelete dispatch) Creates an action to execute when aGuildDeleteis received from the gateway.static GuildEmojisUpdateActionguildEmojisUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildEmojisUpdate dispatch) Creates an action to execute when aGuildEmojisUpdateis received from the gateway.static GuildMemberAddActionguildMemberAdd(int shardIndex, discord4j.discordjson.json.gateway.GuildMemberAdd dispatch) Creates an action to execute when aGuildMemberAddis received from the gateway.static GuildMemberRemoveActionguildMemberRemove(int shardIndex, discord4j.discordjson.json.gateway.GuildMemberRemove dispatch) Creates an action to execute when aGuildMemberRemoveis received from the gateway.static GuildMembersChunkActionguildMembersChunk(int shardIndex, discord4j.discordjson.json.gateway.GuildMembersChunk dispatch) Creates an action to execute when aGuildMembersChunkis received from the gateway.static GuildMemberUpdateActionguildMemberUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildMemberUpdate dispatch) Creates an action to execute when aGuildMemberUpdateis received from the gateway.static GuildRoleCreateActionguildRoleCreate(int shardIndex, discord4j.discordjson.json.gateway.GuildRoleCreate dispatch) Creates an action to execute when aGuildRoleCreateis received from the gateway.static GuildRoleDeleteActionguildRoleDelete(int shardIndex, discord4j.discordjson.json.gateway.GuildRoleDelete dispatch) Creates an action to execute when aGuildRoleDeleteis received from the gateway.static GuildRoleUpdateActionguildRoleUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildRoleUpdate dispatch) Creates an action to execute when aGuildRoleUpdateis received from the gateway.guildScheduledEventCreate(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventCreate dispatch) Creates an action to execute when aGuildScheduledEventCreateis received from the gateway.guildScheduledEventDelete(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventDelete dispatch) Creates an action to execute when aGuildScheduledEventDeleteis received from the gateway.guildScheduledEventUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventUpdate dispatch) Creates an action to execute when aGuildScheduledEventUpdateis received from the gateway.guildScheduledEventUserAdd(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventUserAdd dispatch) Creates an action to execute when aGuildScheduledEventUserAddis received from the gateway.guildScheduledEventUserRemove(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventUserRemove dispatch) Creates an action to execute when aGuildScheduledEventUserRemoveis received from the gateway.static GuildStickersUpdateActionguildStickersUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildStickersUpdate dispatch) Creates an action to execute when aGuildStickersUpdateis received from the gateway.static GuildUpdateActionguildUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildUpdate dispatch) Creates an action to execute when aGuildUpdateis received from the gateway.static InvalidateShardActioninvalidateShard(int shardIndex, InvalidationCause cause) Creates an action to execute when a shard should be invalidated.static MessageCreateActionmessageCreate(int shardIndex, discord4j.discordjson.json.gateway.MessageCreate dispatch) Creates an action to execute when aMessageCreateis received from the gateway.static MessageDeleteActionmessageDelete(int shardIndex, discord4j.discordjson.json.gateway.MessageDelete dispatch) Creates an action to execute when aMessageDeleteis received from the gateway.static MessageDeleteBulkActionmessageDeleteBulk(int shardIndex, discord4j.discordjson.json.gateway.MessageDeleteBulk dispatch) Creates an action to execute when aMessageDeleteBulkis received from the gateway.static MessageReactionAddActionmessageReactionAdd(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionAdd dispatch) Creates an action to execute when aMessageReactionAddis received from the gateway.static MessageReactionRemoveActionmessageReactionRemove(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemove dispatch) Creates an action to execute when aMessageReactionRemoveis received from the gateway.messageReactionRemoveAll(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemoveAll dispatch) Creates an action to execute when aMessageReactionRemoveAllis received from the gateway.messageReactionRemoveEmoji(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemoveEmoji dispatch) Creates an action to execute when aMessageReactionRemoveEmojiis received from the gateway.static MessageUpdateActionmessageUpdate(int shardIndex, discord4j.discordjson.json.gateway.MessageUpdate dispatch) Creates an action to execute when aMessageUpdateis received from the gateway.static PresenceUpdateActionpresenceUpdate(int shardIndex, discord4j.discordjson.json.gateway.PresenceUpdate dispatch) Creates an action to execute when aPresenceUpdateis received from the gateway.static ReadyActionready(discord4j.discordjson.json.gateway.Ready dispatch) Creates an action to execute when aReadyis received from the gateway.static ThreadCreateActionthreadCreate(int shardIndex, discord4j.discordjson.json.gateway.ThreadCreate dispatch) Creates an action to execute when aThreadCreateis received from the gateway.static ThreadDeleteActionthreadDelete(int shardIndex, discord4j.discordjson.json.gateway.ThreadDelete dispatch) Creates an action to execute when aThreadDeleteis received from the gateway.static ThreadListSyncActionthreadListSync(int shardIndex, discord4j.discordjson.json.gateway.ThreadListSync dispatch) Creates an action to execute when aThreadListSyncis received from the gateway.static ThreadMembersUpdateActionthreadMembersUpdate(int shardIndex, discord4j.discordjson.json.gateway.ThreadMembersUpdate dispatch) Creates an action to execute when aThreadMembersUpdateis received from the gateway.static ThreadMemberUpdateActionthreadMemberUpdate(int shardIndex, discord4j.discordjson.json.gateway.ThreadMemberUpdate dispatch) Creates an action to execute when aThreadMemberUpdateis received from the gateway.static ThreadUpdateActionthreadUpdate(int shardIndex, discord4j.discordjson.json.gateway.ThreadUpdate dispatch) Creates an action to execute when aThreadUpdateis received from the gateway.static UserUpdateActionuserUpdate(int shardIndex, discord4j.discordjson.json.gateway.UserUpdate dispatch) Creates an action to execute when aUserUpdateis received from the gateway.voiceStateUpdateDispatch(int shardIndex, discord4j.discordjson.json.gateway.VoiceStateUpdateDispatch dispatch) Creates an action to execute when aVoiceStateUpdateDispatchis 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 aChannelCreateis 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 aChannelDeleteis 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 aChannelUpdateis 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 aGuildCreateis 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 aGuildDeleteis 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 aGuildStickersUpdateis 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 aGuildEmojisUpdateis 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 aGuildMemberAddis 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 aGuildMemberRemoveis 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 aGuildMembersChunkis 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 aGuildMemberUpdateis 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 aGuildRoleCreateis 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 aGuildRoleDeleteis 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 aGuildRoleUpdateis 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
-
guildScheduledEventCreate
public static GuildScheduledEventCreateAction guildScheduledEventCreate(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventCreate dispatch) Creates an action to execute when aGuildScheduledEventCreateis 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
GuildScheduledEventCreate
-
guildScheduledEventUpdate
public static GuildScheduledEventUpdateAction guildScheduledEventUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventUpdate dispatch) Creates an action to execute when aGuildScheduledEventUpdateis 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
GuildScheduledEventUpdate
-
guildScheduledEventDelete
public static GuildScheduledEventDeleteAction guildScheduledEventDelete(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventDelete dispatch) Creates an action to execute when aGuildScheduledEventDeleteis 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
GuildScheduledEventDelete
-
guildScheduledEventUserAdd
public static GuildScheduledEventUserAddAction guildScheduledEventUserAdd(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventUserAdd dispatch) Creates an action to execute when aGuildScheduledEventUserAddis 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
GuildScheduledEventUserAddAction
-
guildScheduledEventUserRemove
public static GuildScheduledEventUserRemoveAction guildScheduledEventUserRemove(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventUserRemove dispatch) Creates an action to execute when aGuildScheduledEventUserRemoveis 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
GuildScheduledEventUserRemoveAction
-
guildUpdate
public static GuildUpdateAction guildUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildUpdate dispatch) Creates an action to execute when aGuildUpdateis 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 aMessageCreateis 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 aMessageDeleteis 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 aMessageDeleteBulkis 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 aMessageReactionAddis 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 aMessageReactionRemoveis 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 aMessageReactionRemoveAllis 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 aMessageReactionRemoveEmojiis 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 aMessageUpdateis 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 aPresenceUpdateis 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 aReadyis 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 aUserUpdateis 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 aVoiceStateUpdateDispatchis 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 aThreadCreateis 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 aThreadUpdateis 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 aThreadDeleteis 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 aThreadListSyncis 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 aThreadMemberUpdateis 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 aThreadMembersUpdateis 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
-