Class ReadActions
- java.lang.Object
-
- discord4j.common.store.action.read.ReadActions
-
public class ReadActions extends Object
Provides static factories to obtainStoreActioninstances that enable reading data from a store.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CountTotalActioncountChannels()Creates an action to count the number of channels present in a store.static CountInGuildActioncountChannelsInGuild(long guildId)Creates an action to count the number of channels present in a store for the given guild ID.static CountTotalActioncountEmojis()Creates an action to count the number of emojis present in a store.static CountInGuildActioncountEmojisInGuild(long guildId)Creates an action to count the number of emojis present in a store for the given guild ID.static CountInGuildActioncountExactMembersInGuild(long guildId)Creates an action to count the exact number of members for the given guild ID.static CountTotalActioncountGuilds()Creates an action to count the number of guilds present in a store.static CountTotalActioncountMembers()Creates an action to count the number of members present in a store.static CountInGuildActioncountMembersInGuild(long guildId)Creates an action to count the number of members present in a store for the given guild ID.static CountTotalActioncountMessages()Creates an action to count the number of messages present in a store.static CountMessagesInChannelActioncountMessagesInChannel(long channelId)Creates an action to count the number of messages present in a store for the given channel ID.static CountTotalActioncountPresences()Creates an action to count the number of presences present in a store.static CountInGuildActioncountPresencesInGuild(long guildId)Creates an action to count the number of presences present in a store for the given guild ID.static CountTotalActioncountRoles()Creates an action to count the number of roles present in a store.static CountInGuildActioncountRolesInGuild(long guildId)Creates an action to count the number of roles present in a store for the given guild ID.static CountTotalActioncountUsers()Creates an action to count the number of users present in a store.static CountTotalActioncountVoiceStates()Creates an action to count the number of voice states present in a store.static CountVoiceStatesInChannelActioncountVoiceStatesInChannel(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.static CountInGuildActioncountVoiceStatesInGuild(long guildId)Creates an action to count the number of voice states present in a store for the given guild ID.static GetChannelByIdActiongetChannelById(long channelId)Creates an action to retrieve data for the channel corresponding to the given channel ID.static GetChannelsActiongetChannels()Creates an action to retrieve data for all channels present in a store.static GetChannelsInGuildActiongetChannelsInGuild(long guildId)Creates an action to retrieve data for all channels present in a store for the given guild ID.static GetEmojiByIdActiongetEmojiById(long guildId, long emojiId)Creates an action to retrieve data for the emoji corresponding to the given guild ID and emoji ID.static GetEmojisActiongetEmojis()Creates an action to retrieve data for all emojis present in a store.static GetEmojisInGuildActiongetEmojisInGuild(long guildId)Creates an action to retrieve data for all emojis present in a store for the given guild ID.static GetExactMembersInGuildActiongetExactMembersInGuild(long guildId)Creates an action to retrieve data for all members for the given guild ID.static GetGuildByIdActiongetGuildById(long guildId)Creates an action to retrieve data for the guild corresponding to the given guild ID.static GetGuildsActiongetGuilds()Creates an action to retrieve data for all guilds present in a store.static GetMemberByIdActiongetMemberById(long guildId, long userId)Creates an action to retrieve data for the member corresponding to the given guild ID and user ID.static GetMembersActiongetMembers()Creates an action to retrieve data for all members present in a store.static GetMembersInGuildActiongetMembersInGuild(long guildId)Creates an action to retrieve data for all members present in a store for the given guild ID.static GetMessageByIdActiongetMessageById(long channelId, long messageId)Creates an action to retrieve data for the message corresponding to the given channel ID and message ID.static GetMessagesActiongetMessages()Creates an action to retrieve data for all messages present in a store.static GetMessagesInChannelActiongetMessagesInChannel(long channelId)Creates an action to retrieve data for all messages present in a store for the given channel ID.static GetPresenceByIdActiongetPresenceById(long guildId, long userId)Creates an action to retrieve data for the presence corresponding to the given guild ID and user ID.static GetPresencesActiongetPresences()Creates an action to retrieve data for all presences present in a store.static GetPresencesInGuildActiongetPresencesInGuild(long guildId)Creates an action to retrieve data for all presences present in a store for the given guild ID.static GetRoleByIdActiongetRoleById(long guildId, long roleId)Creates an action to retrieve data for the role corresponding to the given guild ID and role ID.static GetRolesActiongetRoles()Creates an action to retrieve data for all roles present in a store.static GetRolesInGuildActiongetRolesInGuild(long guildId)Creates an action to retrieve data for all roles present in a store for the given guild ID.static GetUserByIdActiongetUserById(long userId)Creates an action to retrieve data for the user corresponding to the given user ID.static GetUsersActiongetUsers()Creates an action to retrieve data for all users present in a store.static GetVoiceStateByIdActiongetVoiceStateById(long guildId, long userId)Creates an action to retrieve data for the voice state corresponding to the given guild ID and user ID.static GetVoiceStatesActiongetVoiceStates()Creates an action to retrieve data for all voice states present in a store.static GetVoiceStatesInChannelActiongetVoiceStatesInChannel(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.static GetVoiceStatesInGuildActiongetVoiceStatesInGuild(long guildId)Creates an action to retrieve data for all voice states present in a store for the given guild ID.
-
-
-
Method Detail
-
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 withExactResultNotAvailableException.- 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 IDchannelId- 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
-
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 IDemojiId- 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 withExactResultNotAvailableException.- 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 IDuserId- 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 IDmessageId- 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 IDuserId- 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 IDroleId- 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 IDchannelId- 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 IDuserId- the user ID- Returns:
- a new
GetVoiceStateByIdAction
-
-