Class GatewayActions

java.lang.Object
discord4j.common.store.action.gateway.GatewayActions

public class GatewayActions extends Object
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 Type
    Method
    Description
    channelCreate(int shardIndex, discord4j.discordjson.json.gateway.ChannelCreate dispatch)
    Creates an action to execute when a ChannelCreate is received from the gateway.
    channelDelete(int shardIndex, discord4j.discordjson.json.gateway.ChannelDelete dispatch)
    Creates an action to execute when a ChannelDelete is received from the gateway.
    channelUpdate(int shardIndex, discord4j.discordjson.json.gateway.ChannelUpdate dispatch)
    Creates an action to execute when a ChannelUpdate is received from the gateway.
    completeGuildMembers(long guildId)
    Creates an action that allows to signal that the full member list for the specified guild has been received.
    guildCreate(int shardIndex, discord4j.discordjson.json.gateway.GuildCreate dispatch)
    Creates an action to execute when a GuildCreate is received from the gateway.
    guildDelete(int shardIndex, discord4j.discordjson.json.gateway.GuildDelete dispatch)
    Creates an action to execute when a GuildDelete is received from the gateway.
    guildEmojisUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildEmojisUpdate dispatch)
    Creates an action to execute when a GuildEmojisUpdate is received from the gateway.
    guildMemberAdd(int shardIndex, discord4j.discordjson.json.gateway.GuildMemberAdd dispatch)
    Creates an action to execute when a GuildMemberAdd is received from the gateway.
    guildMemberRemove(int shardIndex, discord4j.discordjson.json.gateway.GuildMemberRemove dispatch)
    Creates an action to execute when a GuildMemberRemove is received from the gateway.
    guildMembersChunk(int shardIndex, discord4j.discordjson.json.gateway.GuildMembersChunk dispatch)
    Creates an action to execute when a GuildMembersChunk is received from the gateway.
    guildMemberUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildMemberUpdate dispatch)
    Creates an action to execute when a GuildMemberUpdate is received from the gateway.
    guildRoleCreate(int shardIndex, discord4j.discordjson.json.gateway.GuildRoleCreate dispatch)
    Creates an action to execute when a GuildRoleCreate is received from the gateway.
    guildRoleDelete(int shardIndex, discord4j.discordjson.json.gateway.GuildRoleDelete dispatch)
    Creates an action to execute when a GuildRoleDelete is received from the gateway.
    guildRoleUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildRoleUpdate dispatch)
    Creates an action to execute when a GuildRoleUpdate is received from the gateway.
    guildStickersUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildStickersUpdate dispatch)
    Creates an action to execute when a GuildStickersUpdate is received from the gateway.
    guildUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildUpdate dispatch)
    Creates an action to execute when a GuildUpdate is received from the gateway.
    invalidateShard(int shardIndex, InvalidationCause cause)
    Creates an action to execute when a shard should be invalidated.
    messageCreate(int shardIndex, discord4j.discordjson.json.gateway.MessageCreate dispatch)
    Creates an action to execute when a MessageCreate is received from the gateway.
    messageDelete(int shardIndex, discord4j.discordjson.json.gateway.MessageDelete dispatch)
    Creates an action to execute when a MessageDelete is received from the gateway.
    messageDeleteBulk(int shardIndex, discord4j.discordjson.json.gateway.MessageDeleteBulk dispatch)
    Creates an action to execute when a MessageDeleteBulk is received from the gateway.
    messageReactionAdd(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionAdd dispatch)
    Creates an action to execute when a MessageReactionAdd is received from the gateway.
    messageReactionRemove(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemove dispatch)
    Creates an action to execute when a MessageReactionRemove is received from the gateway.
    messageReactionRemoveAll(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemoveAll dispatch)
    Creates an action to execute when a MessageReactionRemoveAll is received from the gateway.
    messageReactionRemoveEmoji(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemoveEmoji dispatch)
    Creates an action to execute when a MessageReactionRemoveEmoji is received from the gateway.
    messageUpdate(int shardIndex, discord4j.discordjson.json.gateway.MessageUpdate dispatch)
    Creates an action to execute when a MessageUpdate is received from the gateway.
    presenceUpdate(int shardIndex, discord4j.discordjson.json.gateway.PresenceUpdate dispatch)
    Creates an action to execute when a PresenceUpdate is received from the gateway.
    ready(discord4j.discordjson.json.gateway.Ready dispatch)
    Creates an action to execute when a Ready is received from the gateway.
    threadCreate(int shardIndex, discord4j.discordjson.json.gateway.ThreadCreate dispatch)
    Creates an action to execute when a ThreadCreate is received from the gateway.
    threadDelete(int shardIndex, discord4j.discordjson.json.gateway.ThreadDelete dispatch)
    Creates an action to execute when a ThreadDelete is received from the gateway.
    threadListSync(int shardIndex, discord4j.discordjson.json.gateway.ThreadListSync dispatch)
    Creates an action to execute when a ThreadListSync is received from the gateway.
    threadMembersUpdate(int shardIndex, discord4j.discordjson.json.gateway.ThreadMembersUpdate dispatch)
    Creates an action to execute when a ThreadMembersUpdate is received from the gateway.
    threadMemberUpdate(int shardIndex, discord4j.discordjson.json.gateway.ThreadMemberUpdate dispatch)
    Creates an action to execute when a ThreadMemberUpdate is received from the gateway.
    threadUpdate(int shardIndex, discord4j.discordjson.json.gateway.ThreadUpdate dispatch)
    Creates an action to execute when a ThreadUpdate is received from the gateway.
    userUpdate(int shardIndex, discord4j.discordjson.json.gateway.UserUpdate dispatch)
    Creates an action to execute when a UserUpdate is received from the gateway.
    voiceStateUpdateDispatch(int shardIndex, discord4j.discordjson.json.gateway.VoiceStateUpdateDispatch dispatch)
    Creates an action to execute when a VoiceStateUpdateDispatch is received from the gateway.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • channelCreate

      public static ChannelCreateAction channelCreate(int shardIndex, discord4j.discordjson.json.gateway.ChannelCreate dispatch)
      Creates an action to execute when a ChannelCreate is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a ChannelDelete is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a ChannelUpdate is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a GuildCreate is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a GuildDelete is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a GuildStickersUpdate is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a GuildEmojisUpdate is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a GuildMemberAdd is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a GuildMemberRemove is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a GuildMembersChunk is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a GuildMemberUpdate is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a GuildRoleCreate is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a GuildRoleDelete is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a GuildRoleUpdate is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a GuildUpdate is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 from
      cause - 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 a MessageCreate is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a MessageDelete is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a MessageDeleteBulk is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a MessageReactionAdd is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a MessageReactionRemove is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a MessageReactionRemoveAll is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a MessageReactionRemoveEmoji is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a MessageUpdate is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a PresenceUpdate is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a Ready 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 a UserUpdate is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a VoiceStateUpdateDispatch is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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
    • threadCreate

      public static ThreadCreateAction threadCreate(int shardIndex, discord4j.discordjson.json.gateway.ThreadCreate dispatch)
      Creates an action to execute when a ThreadCreate is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a ThreadUpdate is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a ThreadDelete is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a ThreadListSync is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a ThreadMemberUpdate is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - 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 a ThreadMembersUpdate is received from the gateway.
      Parameters:
      shardIndex - the index of the shard where the dispatch comes from
      dispatch - the dispatch data coming from Discord gateway
      Returns:
      a new ThreadMembersUpdateAction