public class RestEntityRetriever extends Object implements EntityRetriever
Constructor and Description |
---|
RestEntityRetriever(GatewayDiscordClient gateway) |
Modifier and Type | Method and Description |
---|---|
Mono<Channel> |
getChannelById(Snowflake channelId)
Requests to retrieve the channel represented by the supplied ID.
|
Mono<Guild> |
getGuildById(Snowflake guildId)
Requests to retrieve the guild represented by the supplied ID.
|
Flux<GuildChannel> |
getGuildChannels(Snowflake guildId)
Requests to retrieve the guild's channels.
|
Mono<GuildEmoji> |
getGuildEmojiById(Snowflake guildId,
Snowflake emojiId)
Requests to retrieve the guild emoji represented by the supplied IDs.
|
Flux<GuildEmoji> |
getGuildEmojis(Snowflake guildId)
Requests to retrieve the guild's emojis.
|
Flux<Member> |
getGuildMembers(Snowflake guildId)
Requests to retrieve the guild's members.
|
Flux<Role> |
getGuildRoles(Snowflake guildId)
Requests to retrieve the guild's roles.
|
Flux<Guild> |
getGuilds()
Requests to retrieve the guilds the current client is in.
|
Mono<Member> |
getMemberById(Snowflake guildId,
Snowflake userId)
Requests to retrieve the member represented by the supplied IDs.
|
Mono<Message> |
getMessageById(Snowflake channelId,
Snowflake messageId)
Requests to retrieve the message represented by the supplied IDs.
|
Mono<Role> |
getRoleById(Snowflake guildId,
Snowflake roleId)
Requests to retrieve the role represented by the supplied IDs.
|
Mono<User> |
getSelf()
Requests to retrieve the bot user.
|
Mono<User> |
getUserById(Snowflake userId)
Requests to retrieve the user represented by the supplied ID.
|
public RestEntityRetriever(GatewayDiscordClient gateway)
public Mono<Channel> getChannelById(Snowflake channelId)
EntityRetriever
getChannelById
in interface EntityRetriever
channelId
- The ID of the channel.Mono
where, upon successful completion, emits the Channel
as represented by the
supplied ID. If an error is received, it is emitted through the Mono
.public Mono<Guild> getGuildById(Snowflake guildId)
EntityRetriever
getGuildById
in interface EntityRetriever
guildId
- The ID of the guild.Mono
where, upon successful completion, emits the Guild
as represented by the supplied
ID. If an error is received, it is emitted through the Mono
.public Mono<GuildEmoji> getGuildEmojiById(Snowflake guildId, Snowflake emojiId)
EntityRetriever
getGuildEmojiById
in interface EntityRetriever
guildId
- The ID of the guild.emojiId
- The ID of the emoji.Mono
where, upon successful completion, emits the GuildEmoji
as represented by the
supplied IDs. If an error is received, it is emitted through the Mono
.public Mono<Member> getMemberById(Snowflake guildId, Snowflake userId)
EntityRetriever
getMemberById
in interface EntityRetriever
guildId
- The ID of the guild.userId
- The ID of the user.Mono
where, upon successful completion, emits the Member
as represented by the supplied
IDs. If an error is received, it is emitted through the Mono
.public Mono<Message> getMessageById(Snowflake channelId, Snowflake messageId)
EntityRetriever
getMessageById
in interface EntityRetriever
channelId
- The ID of the channel.messageId
- The ID of the message.Mono
where, upon successful completion, emits the Message
as represented by the
supplied IDs. If an error is received, it is emitted through the Mono
.public Mono<Role> getRoleById(Snowflake guildId, Snowflake roleId)
EntityRetriever
getRoleById
in interface EntityRetriever
guildId
- The ID of the guild.roleId
- The ID of the role.Mono
where, upon successful completion, emits the Role
as represented by the supplied
IDs. If an error is received, it is emitted through the Mono
.public Mono<User> getUserById(Snowflake userId)
EntityRetriever
getUserById
in interface EntityRetriever
userId
- The ID of the user.Mono
where, upon successful completion, emits the User
as represented by the supplied
ID. If an error is received, it is emitted through the Mono
.public Flux<Guild> getGuilds()
EntityRetriever
getGuilds
in interface EntityRetriever
Flux
that continually emits the guilds
that the current client is in. If an error
is received, it is emitted through the Flux
.public Mono<User> getSelf()
EntityRetriever
getSelf
in interface EntityRetriever
Mono
where, upon successful completion, emits the bot user
. If an error is
received, it is emitted through the Mono
.public Flux<Member> getGuildMembers(Snowflake guildId)
EntityRetriever
getGuildMembers
in interface EntityRetriever
guildId
- the ID of the guild.Flux
that continually emits the members
of the guild. If an error is received,
it is emitted through the Flux
.public Flux<GuildChannel> getGuildChannels(Snowflake guildId)
EntityRetriever
The order of items emitted by the returned Flux
is unspecified. Use
OrderUtil.orderGuildChannels(Flux)
to consistently order channels.
getGuildChannels
in interface EntityRetriever
guildId
- the ID of the guild.Flux
that continually emits the guild's channels
. If an error is received,
it is emitted through the Flux
.public Flux<Role> getGuildRoles(Snowflake guildId)
EntityRetriever
The order of items emitted by the returned Flux
is unspecified. Use OrderUtil.orderRoles(Flux)
to consistently order roles.
getGuildRoles
in interface EntityRetriever
Flux
that continually emits the guild's roles
. If an error is received, it is
emitted through the Flux
.public Flux<GuildEmoji> getGuildEmojis(Snowflake guildId)
EntityRetriever
getGuildEmojis
in interface EntityRetriever
Flux
that continually emits the guild's emojis
. If an error is received,
it is emitted through the Flux
.