Class GatewayActions
- java.lang.Object
-
- discord4j.common.store.action.gateway.GatewayActions
-
public class GatewayActions extends Object
Provides static factories to obtainStoreActioninstances that enable updating data in a store in response to an event received from the Discord gateway.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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.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.static MessageReactionRemoveAllActionmessageReactionRemoveAll(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemoveAll dispatch)Creates an action to execute when aMessageReactionRemoveAllis received from the gateway.static MessageReactionRemoveEmojiActionmessageReactionRemoveEmoji(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 UserUpdateActionuserUpdate(int shardIndex, discord4j.discordjson.json.gateway.UserUpdate dispatch)Creates an action to execute when aUserUpdateis received from the gateway.static VoiceStateUpdateDispatchActionvoiceStateUpdateDispatch(int shardIndex, discord4j.discordjson.json.gateway.VoiceStateUpdateDispatch dispatch)Creates an action to execute when aVoiceStateUpdateDispatchis received from the gateway.
-
-
-
Method Detail
-
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
-
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
-
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
public static InvalidateShardAction invalidateShard(int shardIndex, InvalidationCause cause)
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
public static ReadyAction ready(discord4j.discordjson.json.gateway.Ready dispatch)
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
public static CompleteGuildMembersAction completeGuildMembers(long guildId)
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
-
-