Interface GuildMessageChannel
-
- All Superinterfaces:
CategorizableChannel,Channel,DiscordObject,Entity,GuildChannel,MessageChannel,TopLevelGuildChannel
- All Known Subinterfaces:
TopLevelGuildMessageChannel
- All Known Implementing Classes:
NewsChannel,TextChannel,VoiceChannel
public interface GuildMessageChannel extends CategorizableChannel, MessageChannel
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
All Methods Instance Methods Abstract Methods Default Methods Deprecated 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.default discord4j.core.spec.InviteCreateMonocreateInvite()Deprecated.Threads aren't categorizable, so when they are released, GuildMessageChannel will no longer extend CategorizableChannel.Mono<ExtendedInvite>createInvite(discord4j.core.spec.InviteCreateSpec spec)Deprecated.Threads aren't categorizable, so when they are released, GuildMessageChannel will no longer extend CategorizableChannel.Mono<Webhook>createWebhook(discord4j.core.spec.WebhookCreateSpec spec)Deprecated.Threads don't have webhooks, so when they are released, this will be moved toTopLevelGuildMessageChannel.createWebhook(WebhookCreateSpec).default discord4j.core.spec.WebhookCreateMonocreateWebhook(String name)Deprecated.Threads don't have webhooks, so when they are released, this will be moved toTopLevelGuildMessageChannel.createWebhook(String).Mono<Webhook>createWebhook(Consumer<? super LegacyWebhookCreateSpec> spec)Deprecated.usecreateWebhook(WebhookCreateSpec)orcreateWebhook(String)which offer an immutable approach to build specsMono<Category>getCategory()Deprecated.Threads aren't categorizable, so when they are released, GuildMessageChannel will no longer extend CategorizableChannel.Mono<Category>getCategory(EntityRetrievalStrategy retrievalStrategy)Deprecated.Threads aren't categorizable, so when they are released, GuildMessageChannel will no longer extend CategorizableChannel.Optional<Snowflake>getCategoryId()Deprecated.Threads aren't categorizable, so when they are released, GuildMessageChannel will no longer extend CategorizableChannel.Flux<ExtendedInvite>getInvites()Deprecated.Threads aren't categorizable, so when they are released, GuildMessageChannel will no longer extend CategorizableChannel.Flux<Member>getMembers()Returns all members in the guild which have access to view this channel.Optional<String>getTopic()Deprecated.Threads don't have topics, so when they are released, this will be moved toTopLevelGuildMessageChannel.getTopic().Flux<Webhook>getWebhooks()Deprecated.Threads don't have webhooks, so when they are released, this will be moved toTopLevelGuildMessageChannel.getWebhooks().-
Methods inherited from interface discord4j.core.object.entity.channel.CategorizableChannel
createInvite
-
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
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
-
Methods inherited from interface discord4j.core.object.entity.channel.TopLevelGuildChannel
addMemberOverwrite, addMemberOverwrite, addRoleOverwrite, addRoleOverwrite, getOverwriteForMember, getOverwriteForRole, getPermissionOverwrites, getPosition, getRawPosition
-
-
-
-
Method Detail
-
getTopic
@Deprecated Optional<String> getTopic()
Deprecated.Threads don't have topics, so when they are released, this will be moved toTopLevelGuildMessageChannel.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.
If you have achannel.getMessagesBefore(Snowflake.of(Instant.now())) .take(420) .map(Message::getId) .transform(channel::bulkDelete)Publisher<Message>, considerbulkDeleteMessages(Publisher).- Parameters:
messageIds- APublisherto supply the message IDs to bulk delete.- Returns:
- A
Fluxthat continually emitsmessage IDsthat 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.
If you have achannel.getMessagesBefore(Snowflake.of(Instant.now())) .take(420) .transform(channel::bulkDeleteMessages)Publisher<Snowflake>, considerbulkDelete(Publisher).
-
createWebhook
@Deprecated Mono<Webhook> createWebhook(Consumer<? super LegacyWebhookCreateSpec> spec)
Deprecated.usecreateWebhook(WebhookCreateSpec)orcreateWebhook(String)which offer an immutable approach to build specsRequests to create a webhook.- Parameters:
spec- AConsumerthat provides a "blank"LegacyWebhookCreateSpecto be operated on.- Returns:
- A
Monowhere, upon successful completion, emits the createdWebhook. If an error is received, it is emitted through theMono.
-
createWebhook
@Deprecated default discord4j.core.spec.WebhookCreateMono createWebhook(String name)
Deprecated.Threads don't have webhooks, so when they are released, this will be moved toTopLevelGuildMessageChannel.createWebhook(String).Requests to create a webhook. Properties specifying how to create the webhook can be set via thewithXxxmethods of the returnedWebhookCreateMono.
-
createWebhook
@Deprecated Mono<Webhook> createWebhook(discord4j.core.spec.WebhookCreateSpec spec)
Deprecated.Threads don't have webhooks, so when they are released, this will be moved toTopLevelGuildMessageChannel.createWebhook(WebhookCreateSpec).Requests to create a webhook.
-
getWebhooks
@Deprecated Flux<Webhook> getWebhooks()
Deprecated.Threads don't have webhooks, so when they are released, this will be moved toTopLevelGuildMessageChannel.getWebhooks().Requests to retrieve the webhooks of the channel.
-
getMembers
Flux<Member> getMembers()
Returns all members in the guild which have access to view this channel.- Returns:
- A
Fluxthat continually emits all members fromGuild.getMembers()which have access to view this channelPermission.VIEW_CHANNEL
-
getCategoryId
@Deprecated Optional<Snowflake> getCategoryId()
Deprecated.Threads aren't categorizable, so when they are released, GuildMessageChannel will no longer extend CategorizableChannel. UseCategorizableChannel.getCategoryId()Description copied from interface:CategorizableChannelGets the ID of the category for this channel, if present.- Specified by:
getCategoryIdin interfaceCategorizableChannel- Returns:
- The ID of the category for this channel, if present.
-
getCategory
@Deprecated Mono<Category> getCategory()
Deprecated.Threads aren't categorizable, so when they are released, GuildMessageChannel will no longer extend CategorizableChannel. UseCategorizableChannel.getCategory()Description copied from interface:CategorizableChannelRequests to retrieve the category for this channel, if present.- Specified by:
getCategoryin interfaceCategorizableChannel- Returns:
- A
Monowhere, upon successful completion, emits thecategorythis channel, if present. If an error is received, it is emitted through theMono.
-
getCategory
@Deprecated Mono<Category> getCategory(EntityRetrievalStrategy retrievalStrategy)
Deprecated.Threads aren't categorizable, so when they are released, GuildMessageChannel will no longer extend CategorizableChannel. UseCategorizableChannel.getCategory(EntityRetrievalStrategy)Description copied from interface:CategorizableChannelRequests to retrieve the category for this channel, if present, using the given retrieval strategy.- Specified by:
getCategoryin interfaceCategorizableChannel- Parameters:
retrievalStrategy- the strategy to use to get the category- Returns:
- A
Monowhere, upon successful completion, emits thecategorythis channel, if present. If an error is received, it is emitted through theMono.
-
createInvite
@Deprecated default discord4j.core.spec.InviteCreateMono createInvite()
Deprecated.Threads aren't categorizable, so when they are released, GuildMessageChannel will no longer extend CategorizableChannel. UseCategorizableChannel.createInvite()Description copied from interface:CategorizableChannelRequests to create an invite. Properties specifying how to create the invite can be set via thewithXxxmethods of the returnedInviteCreateMono.- Specified by:
createInvitein interfaceCategorizableChannel- Returns:
- A
InviteCreateMonowhere, upon successful completion, emits the createdExtendedInvite. If an error is received, it is emitted through theInviteCreateMono.
-
createInvite
@Deprecated Mono<ExtendedInvite> createInvite(discord4j.core.spec.InviteCreateSpec spec)
Deprecated.Threads aren't categorizable, so when they are released, GuildMessageChannel will no longer extend CategorizableChannel. UseCategorizableChannel.createInvite(InviteCreateSpec))}Description copied from interface:CategorizableChannelRequests to create an invite.- Specified by:
createInvitein interfaceCategorizableChannel- Parameters:
spec- an immutable object that specifies how to create the invite- Returns:
- A
Monowhere, upon successful completion, emits the createdExtendedInvite. If an error is received, it is emitted through theMono.
-
getInvites
@Deprecated Flux<ExtendedInvite> getInvites()
Deprecated.Threads aren't categorizable, so when they are released, GuildMessageChannel will no longer extend CategorizableChannel. UseCategorizableChannel.getInvites())}Description copied from interface:CategorizableChannelRequests to retrieve this channel's invites.- Specified by:
getInvitesin interfaceCategorizableChannel- Returns:
- A
Fluxthat continually emits this channel'sinvites. If an error is received, it is emitted through theFlux.
-
-