Table of Contents

Class AnnouncementGuildThread

Namespace
NetCord
Assembly
NetCord.dll

Represents a thread within an AnnouncementGuildChannel.

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

Constructors

AnnouncementGuildThread(JsonChannel, RestClient)

Represents a thread within an AnnouncementGuildChannel.

public AnnouncementGuildThread(JsonChannel jsonModel, RestClient client)

Parameters

jsonModel JsonChannel
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<AnnouncementGuildThread> 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<AnnouncementGuildThread>

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<AnnouncementGuildThread> 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<AnnouncementGuildThread>

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

Modifies a guild channel's properties.

public Task<AnnouncementGuildThread> 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<AnnouncementGuildThread>