Class ReadActions

java.lang.Object
discord4j.common.store.action.read.ReadActions

public class ReadActions extends Object
Provides static factories to obtain StoreAction instances that enable reading data from a store.
  • Method Details

    • countChannels

      public static CountTotalAction countChannels()
      Creates an action to count the number of channels present in a store.
      Returns:
      a new CountTotalAction
    • countChannelsInGuild

      public static CountInGuildAction countChannelsInGuild(long guildId)
      Creates an action to count the number of channels present in a store for the given guild ID.
      Parameters:
      guildId - the guild ID
      Returns:
      a new CountInGuildAction
    • countEmojis

      public static CountTotalAction countEmojis()
      Creates an action to count the number of emojis present in a store.
      Returns:
      a new CountTotalAction
    • countEmojisInGuild

      public static CountInGuildAction countEmojisInGuild(long guildId)
      Creates an action to count the number of emojis present in a store for the given guild ID.
      Parameters:
      guildId - the guild ID
      Returns:
      a new CountInGuildAction
    • countGuilds

      public static CountTotalAction countGuilds()
      Creates an action to count the number of guilds present in a store.
      Returns:
      a new CountTotalAction
    • countMembers

      public static CountTotalAction countMembers()
      Creates an action to count the number of members present in a store.
      Returns:
      a new CountTotalAction
    • countMembersInGuild

      public static CountInGuildAction countMembersInGuild(long guildId)
      Creates an action to count the number of members present in a store for the given guild ID.
      Parameters:
      guildId - the guild ID
      Returns:
      a new CountInGuildAction
    • countExactMembersInGuild

      public static CountInGuildAction countExactMembersInGuild(long guildId)
      Creates an action to count the exact number of members for the given guild ID. If some members are not present in the store and thus is not able to return an accurate count, executing this action will error with ExactResultNotAvailableException.
      Parameters:
      guildId - the guild ID
      Returns:
      a new CountInGuildAction
    • countMessages

      public static CountTotalAction countMessages()
      Creates an action to count the number of messages present in a store.
      Returns:
      a new CountTotalAction
    • countMessagesInChannel

      public static CountMessagesInChannelAction countMessagesInChannel(long channelId)
      Creates an action to count the number of messages present in a store for the given channel ID.
      Parameters:
      channelId - the channel ID
      Returns:
      a new CountMessagesInChannelAction
    • countPresences

      public static CountTotalAction countPresences()
      Creates an action to count the number of presences present in a store.
      Returns:
      a new CountTotalAction
    • countPresencesInGuild

      public static CountInGuildAction countPresencesInGuild(long guildId)
      Creates an action to count the number of presences present in a store for the given guild ID.
      Parameters:
      guildId - the guild ID
      Returns:
      a new CountInGuildAction
    • countRoles

      public static CountTotalAction countRoles()
      Creates an action to count the number of roles present in a store.
      Returns:
      a new CountTotalAction
    • countRolesInGuild

      public static CountInGuildAction countRolesInGuild(long guildId)
      Creates an action to count the number of roles present in a store for the given guild ID.
      Parameters:
      guildId - the guild ID
      Returns:
      a new CountInGuildAction
    • countUsers

      public static CountTotalAction countUsers()
      Creates an action to count the number of users present in a store.
      Returns:
      a new CountTotalAction
    • countVoiceStates

      public static CountTotalAction countVoiceStates()
      Creates an action to count the number of voice states present in a store.
      Returns:
      a new CountTotalAction
    • countVoiceStatesInGuild

      public static CountInGuildAction countVoiceStatesInGuild(long guildId)
      Creates an action to count the number of voice states present in a store for the given guild ID.
      Parameters:
      guildId - the guild ID
      Returns:
      a new CountInGuildAction
    • countVoiceStatesInChannel

      public static CountVoiceStatesInChannelAction countVoiceStatesInChannel(long guildId, long channelId)
      Creates an action to count the number of voice states present in a store for the given guild ID and channel ID.
      Parameters:
      guildId - the guild ID
      channelId - the channel ID
      Returns:
      a new CountMessagesInChannelAction
    • getChannels

      public static GetChannelsAction getChannels()
      Creates an action to retrieve data for all channels present in a store.
      Returns:
      a new GetChannelsAction
    • getChannelsInGuild

      public static GetChannelsInGuildAction getChannelsInGuild(long guildId)
      Creates an action to retrieve data for all channels present in a store for the given guild ID.
      Parameters:
      guildId - the guild ID
      Returns:
      a new GetChannelsInGuildAction
    • getChannelById

      public static GetChannelByIdAction getChannelById(long channelId)
      Creates an action to retrieve data for the channel corresponding to the given channel ID.
      Parameters:
      channelId - the channel ID
      Returns:
      a new GetChannelByIdAction
    • getStickersInGuild

      public static GetStickersInGuildAction getStickersInGuild(long guildId)
      Creates an action to retrieve data for all stickers present in a store for the given guild ID.
      Parameters:
      guildId - the guild ID
      Returns:
      a new GetStickersInGuildAction
    • getStickerById

      public static GetStickerByIdAction getStickerById(long guildId, long stickerId)
      Creates an action to retrieve data for the sticker corresponding to the given guild ID and sticker ID.
      Parameters:
      guildId - the guild ID
      stickerId - the sticker ID
      Returns:
      a new GetStickerByIdAction
    • getAutoModRulesInGuild

      public static GetAutoModRulesInGuildAction getAutoModRulesInGuild(long guildId)
      Creates an action to retrieve data for all automod rules present in a store for the given guild ID.
      Parameters:
      guildId - the guild ID
      Returns:
      a new GetAutoModRulesInGuildAction
    • getAutoModRuleById

      public static GetAutoModRuleByIdAction getAutoModRuleById(long guildId, long autoModRuleId)
      Creates an action to retrieve data for the automod rule corresponding to the given guild ID and automod rule ID.
      Parameters:
      guildId - the guild ID
      autoModRuleId - the automod rule ID
      Returns:
      a new GetAutoModRuleByIdAction
    • getEmojis

      public static GetEmojisAction getEmojis()
      Creates an action to retrieve data for all emojis present in a store.
      Returns:
      a new GetEmojisAction
    • getEmojisInGuild

      public static GetEmojisInGuildAction getEmojisInGuild(long guildId)
      Creates an action to retrieve data for all emojis present in a store for the given guild ID.
      Parameters:
      guildId - the guild ID
      Returns:
      a new GetEmojisInGuildAction
    • getEmojiById

      public static GetEmojiByIdAction getEmojiById(long guildId, long emojiId)
      Creates an action to retrieve data for the emoji corresponding to the given guild ID and emoji ID.
      Parameters:
      guildId - the guild ID
      emojiId - the emoji ID
      Returns:
      a new GetEmojiByIdAction
    • getGuilds

      public static GetGuildsAction getGuilds()
      Creates an action to retrieve data for all guilds present in a store.
      Returns:
      a new GetGuildsAction
    • getGuildById

      public static GetGuildByIdAction getGuildById(long guildId)
      Creates an action to retrieve data for the guild corresponding to the given guild ID.
      Parameters:
      guildId - the guild ID
      Returns:
      a new GetGuildByIdAction
    • getMembers

      public static GetMembersAction getMembers()
      Creates an action to retrieve data for all members present in a store.
      Returns:
      a new GetMembersAction
    • getMembersInGuild

      public static GetMembersInGuildAction getMembersInGuild(long guildId)
      Creates an action to retrieve data for all members present in a store for the given guild ID.
      Parameters:
      guildId - the guild ID
      Returns:
      a new GetMembersInGuildAction
    • getExactMembersInGuild

      public static GetExactMembersInGuildAction getExactMembersInGuild(long guildId)
      Creates an action to retrieve data for all members for the given guild ID. If some members are not present in the store and thus is not able to return the full member list of the guild, executing this action will error with ExactResultNotAvailableException.
      Parameters:
      guildId - the guild ID
      Returns:
      a new GetExactMembersInGuildAction
    • getMemberById

      public static GetMemberByIdAction getMemberById(long guildId, long userId)
      Creates an action to retrieve data for the member corresponding to the given guild ID and user ID.
      Parameters:
      guildId - the guild ID
      userId - the user ID
      Returns:
      a new GetMemberByIdAction
    • getMessages

      public static GetMessagesAction getMessages()
      Creates an action to retrieve data for all messages present in a store.
      Returns:
      a new GetMessagesAction
    • getMessagesInChannel

      public static GetMessagesInChannelAction getMessagesInChannel(long channelId)
      Creates an action to retrieve data for all messages present in a store for the given channel ID.
      Parameters:
      channelId - the channel ID
      Returns:
      a new GetMessagesInChannelAction
    • getMessageById

      public static GetMessageByIdAction getMessageById(long channelId, long messageId)
      Creates an action to retrieve data for the message corresponding to the given channel ID and message ID.
      Parameters:
      channelId - the channel ID
      messageId - the message ID
      Returns:
      a new GetMessageByIdAction
    • getPresences

      public static GetPresencesAction getPresences()
      Creates an action to retrieve data for all presences present in a store.
      Returns:
      a new GetPresencesAction
    • getPresencesInGuild

      public static GetPresencesInGuildAction getPresencesInGuild(long guildId)
      Creates an action to retrieve data for all presences present in a store for the given guild ID.
      Parameters:
      guildId - the guild ID
      Returns:
      a new GetPresencesInGuildAction
    • getPresenceById

      public static GetPresenceByIdAction getPresenceById(long guildId, long userId)
      Creates an action to retrieve data for the presence corresponding to the given guild ID and user ID.
      Parameters:
      guildId - the guild ID
      userId - the user ID
      Returns:
      a new GetPresenceByIdAction
    • getRoles

      public static GetRolesAction getRoles()
      Creates an action to retrieve data for all roles present in a store.
      Returns:
      a new GetRolesAction
    • getRolesInGuild

      public static GetRolesInGuildAction getRolesInGuild(long guildId)
      Creates an action to retrieve data for all roles present in a store for the given guild ID.
      Parameters:
      guildId - the guild ID
      Returns:
      a new GetRolesInGuildAction
    • getRoleById

      public static GetRoleByIdAction getRoleById(long guildId, long roleId)
      Creates an action to retrieve data for the role corresponding to the given guild ID and role ID.
      Parameters:
      guildId - the guild ID
      roleId - the role ID
      Returns:
      a new GetRoleByIdAction
    • getUsers

      public static GetUsersAction getUsers()
      Creates an action to retrieve data for all users present in a store.
      Returns:
      a new GetUsersAction
    • getUserById

      public static GetUserByIdAction getUserById(long userId)
      Creates an action to retrieve data for the user corresponding to the given user ID.
      Parameters:
      userId - the user ID
      Returns:
      a new GetUserByIdAction
    • getVoiceStates

      public static GetVoiceStatesAction getVoiceStates()
      Creates an action to retrieve data for all voice states present in a store.
      Returns:
      a new GetVoiceStatesAction
    • getVoiceStatesInChannel

      public static GetVoiceStatesInChannelAction getVoiceStatesInChannel(long guildId, long channelId)
      Creates an action to retrieve data for all voice states present in a store for the given guild ID and channel ID.
      Parameters:
      guildId - the guild ID
      channelId - the channel ID
      Returns:
      a new GetVoiceStatesInChannelAction
    • getVoiceStatesInGuild

      public static GetVoiceStatesInGuildAction getVoiceStatesInGuild(long guildId)
      Creates an action to retrieve data for all voice states present in a store for the given guild ID.
      Parameters:
      guildId - the guild ID
      Returns:
      a new GetVoiceStatesInGuildAction
    • getVoiceStateById

      public static GetVoiceStateByIdAction getVoiceStateById(long guildId, long userId)
      Creates an action to retrieve data for the voice state corresponding to the given guild ID and user ID.
      Parameters:
      guildId - the guild ID
      userId - the user ID
      Returns:
      a new GetVoiceStateByIdAction
    • getStageInstanceByChannelId

      public static GetStageInstanceByChannelIdAction getStageInstanceByChannelId(long channelId)
      Creates an action to retrieve data for the stage instance corresponding to the given channel ID.
      Parameters:
      channelId - the channel ID
      Returns:
      a new GetStageInstanceByChannelIdAction
    • getThreadMemberById

      public static GetThreadMemberByIdAction getThreadMemberById(long threadId, long userId)
      Creates an action to retrieve data for the thread member corresponding to the given thread ID and user ID.
      Parameters:
      threadId - the thread ID
      userId - the user ID
      Returns:
      a new GetThreadMemberByIdAction
    • getMembersInThread

      public static GetMembersInThreadAction getMembersInThread(long threadId)
      Creates an action to retrieve data for all thread members present in a store for the given thread ID.
      Parameters:
      threadId - the thread ID
      Returns:
      a new GetMembersInThreadAction