Interface GuildMessageChannel
-
- All Superinterfaces:
CategorizableChannel
,Channel
,DiscordObject
,Entity
,GuildChannel
,MessageChannel
- All Known Implementing Classes:
NewsChannel
,TextChannel
public interface GuildMessageChannel extends CategorizableChannel, MessageChannel
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface discord4j.core.object.entity.channel.Channel
Channel.Type
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Flux<Snowflake>
bulkDelete(Publisher<Snowflake> messageIds)
Requests to bulk delete the supplied message IDs.Flux<Message>
bulkDeleteMessages(Publisher<Message> messages)
Requests to bulk delete the supplied messages.Mono<Webhook>
createWebhook(Consumer<? super WebhookCreateSpec> spec)
Requests to create a webhook.Flux<Member>
getMembers()
Returns all members in the guild which have access to view this channel.Optional<String>
getTopic()
Gets the channel topic, if present.Flux<Webhook>
getWebhooks()
Requests to retrieve the webhooks of the channel.-
Methods inherited from interface discord4j.core.object.entity.channel.CategorizableChannel
createInvite, getCategory, getCategory, getCategoryId, getInvites
-
Methods inherited from interface discord4j.core.object.entity.channel.Channel
delete, delete, getMention, getRestChannel, getType
-
Methods inherited from interface discord4j.core.object.DiscordObject
getClient
-
Methods inherited from interface discord4j.core.object.entity.channel.GuildChannel
addMemberOverwrite, addMemberOverwrite, addRoleOverwrite, addRoleOverwrite, getEffectivePermissions, getGuild, getGuild, getGuildId, getName, getOverwriteForMember, getOverwriteForRole, getPermissionOverwrites, getPosition, getRawPosition
-
Methods inherited from interface discord4j.core.object.entity.channel.MessageChannel
createEmbed, createMessage, createMessage, getLastMessage, getLastMessage, getLastMessageId, getLastPinTimestamp, getMessageById, getMessageById, getMessagesAfter, getMessagesBefore, getPinnedMessages, type, typeUntil
-
-
-
-
Method Detail
-
getTopic
Optional<String> getTopic()
Gets the channel topic, if present.- Returns:
- The channel topic, if present.
-
bulkDelete
Flux<Snowflake> bulkDelete(Publisher<Snowflake> messageIds)
Requests to bulk delete the supplied message IDs.Typically this method is paired with a call from
MessageChannel.getMessagesBefore(Snowflake)
orMessageChannel.getMessagesAfter(Snowflake)
to delete some or (potentially) all messages from a channel.channel.getMessagesBefore(Snowflake.of(Instant.now())) .take(420) .map(Message::getId) .transform(channel::bulkDelete)
Publisher<Message>
, considerbulkDeleteMessages(Publisher)
.- Parameters:
messageIds
- APublisher
to supply the message IDs to bulk delete.- Returns:
- A
Flux
that continually emitsmessage IDs
that were not bulk deleted (typically if the ID was older than 2 weeks). If an error is received, it is emitted through theFlux
.
-
bulkDeleteMessages
Flux<Message> bulkDeleteMessages(Publisher<Message> messages)
Requests to bulk delete the supplied messages.Typically this method is paired with a call from
MessageChannel.getMessagesBefore(Snowflake)
orMessageChannel.getMessagesAfter(Snowflake)
to delete some or (potentially) all messages from a channel.channel.getMessagesBefore(Snowflake.of(Instant.now())) .take(420) .transform(channel::bulkDeleteMessages)
Publisher<Snowflake>
, considerbulkDelete(Publisher)
.
-
createWebhook
Mono<Webhook> createWebhook(Consumer<? super WebhookCreateSpec> spec)
Requests to create a webhook.- Parameters:
spec
- AConsumer
that provides a "blank"WebhookCreateSpec
to be operated on.- Returns:
- A
Mono
where, upon successful completion, emits the createdWebhook
. If an error is received, it is emitted through theMono
.
-
getMembers
Flux<Member> getMembers()
Returns all members in the guild which have access to view this channel.- Returns:
- A
Flux
that continually emits all members fromGuild.getMembers()
which have access to view this channelPermission.VIEW_CHANNEL
-
-