Table of Contents

Class AnnouncementGuildChannel

Namespace
NetCord
Assembly
NetCord.dll

Represents a channel that users can follow and crosspost from into their own servers. Formerly known as news channels.

public class AnnouncementGuildChannel : TextGuildChannel, IEquatable<Entity>, IJsonModel<JsonChannel>, IInteractionChannel, IGuildChannel, INamedChannel, IEntity, ISpanFormattable, IFormattable
Inheritance
AnnouncementGuildChannel
Implements
Inherited Members

Constructors

AnnouncementGuildChannel(JsonChannel, ulong, RestClient)

Represents a channel that users can follow and crosspost from into their own servers. Formerly known as news channels.

public AnnouncementGuildChannel(JsonChannel jsonModel, ulong guildId, RestClient client)

Parameters

jsonModel JsonChannel
guildId ulong
client RestClient

Methods

CrosspostMessageAsync(ulong, RestRequestProperties?, CancellationToken)

Crossposts a message from an announcement channel to subscribed channels.

public Task<RestMessage> CrosspostMessageAsync(ulong messageId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

messageId ulong

The ID of the message to crosspost.

properties RestRequestProperties

Optional properties to customize the request, can be null.

cancellationToken CancellationToken

A token that can be used to cancel the operation before it completes.

Returns

Task<RestMessage>

DeleteAsync(RestRequestProperties?, CancellationToken)

Deletes a channel.

public Task<AnnouncementGuildChannel> DeleteAsync(RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

properties RestRequestProperties

Optional properties to customize the request, can be null.

cancellationToken CancellationToken

A token that can be used to cancel the operation before it completes.

Returns

Task<AnnouncementGuildChannel>

FollowAsync(ulong, RestRequestProperties?, CancellationToken)

Follows an announcement channel to another channel.

public Task<FollowedChannel> FollowAsync(ulong webhookChannelId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

webhookChannelId ulong

The ID of the channel to receive crossposted messages.

properties RestRequestProperties

Optional properties to customize the request, can be null.

cancellationToken CancellationToken

A token that can be used to cancel the operation before it completes.

Returns

Task<FollowedChannel>

GetAsync(RestRequestProperties?, CancellationToken)

Retrieves a channel by its ID.

public Task<AnnouncementGuildChannel> GetAsync(RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

properties RestRequestProperties

Optional properties to customize the request, can be null.

cancellationToken CancellationToken

A token that can be used to cancel the operation before it completes.

Returns

Task<AnnouncementGuildChannel>

ModifyAsync(Action<GuildChannelOptions>, RestRequestProperties?, CancellationToken)

Modifies a guild channel's properties.

public Task<AnnouncementGuildChannel> ModifyAsync(Action<GuildChannelOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

action Action<GuildChannelOptions>

An action delegate used to configure the updated channel options.

properties RestRequestProperties

Optional properties to customize the request, can be null.

cancellationToken CancellationToken

A token that can be used to cancel the operation before it completes.

Returns

Task<AnnouncementGuildChannel>