Interface GuildMessageChannel
- All Superinterfaces:
Channel
,DiscordObject
,Entity
,GuildChannel
,MessageChannel
- All Known Subinterfaces:
TopLevelGuildMessageChannel
- All Known Implementing Classes:
NewsChannel
,TextChannel
,ThreadChannel
,VoiceChannel
A Discord channel in a guild that can have messages sent to it.
-
Nested Class Summary
Nested classes/interfaces inherited from interface discord4j.core.object.entity.channel.Channel
Channel.Type
-
Method Summary
Modifier and TypeMethodDescriptionbulkDelete
(Publisher<Snowflake> messageIds) Requests to bulk delete the supplied message IDs.bulkDeleteMessages
(Publisher<Message> messages) Requests to bulk delete the supplied messages.Returns all members in the guild which have access to view this channel.Methods inherited from interface discord4j.core.object.entity.channel.Channel
delete, delete, getData, getId, getMention, getRestChannel, getType
Methods inherited from interface discord4j.core.object.DiscordObject
getClient
Methods inherited from interface discord4j.core.object.entity.channel.GuildChannel
getEffectivePermissions, getEffectivePermissions, getGuild, getGuild, getGuildId, getName
Methods inherited from interface discord4j.core.object.entity.channel.MessageChannel
createEmbed, createEmbed, createMessage, createMessage, createMessage, createMessage, getLastMessage, getLastMessage, getLastMessageId, getLastPinTimestamp, getMessageById, getMessageById, getMessagesAfter, getMessagesBefore, getPinnedMessages, type, typeUntil
-
Method Details
-
bulkDelete
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
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)
. -
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
-