Table of Contents

Class TextChannel

Namespace
NetCord
Assembly
NetCord.dll
public abstract class TextChannel : Channel, IEquatable<Entity>, IJsonModel<JsonChannel>, IInteractionChannel, IEntity, ISpanFormattable, IFormattable
Inheritance
TextChannel
Implements
Derived
Inherited Members

Constructors

TextChannel(JsonChannel, RestClient)

protected TextChannel(JsonChannel jsonModel, RestClient client)

Parameters

jsonModel JsonChannel
client RestClient

Properties

LastMessageId

public ulong? LastMessageId { get; }

Property Value

ulong?

LastPin

public DateTimeOffset? LastPin { get; }

Property Value

DateTimeOffset?

Methods

AddMessageReactionAsync(ulong, ReactionEmojiProperties, RestRequestProperties?, CancellationToken)

public Task AddMessageReactionAsync(ulong messageId, ReactionEmojiProperties emoji, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

messageId ulong
emoji ReactionEmojiProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

CreateFromJson(JsonChannel, RestClient)

public static TextChannel CreateFromJson(JsonChannel jsonChannel, RestClient client)

Parameters

jsonChannel JsonChannel
client RestClient

Returns

TextChannel

DeleteAllMessageReactionsAsync(ulong, ReactionEmojiProperties, RestRequestProperties?, CancellationToken)

public Task DeleteAllMessageReactionsAsync(ulong messageId, ReactionEmojiProperties emoji, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

messageId ulong
emoji ReactionEmojiProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteAllMessageReactionsAsync(ulong, RestRequestProperties?, CancellationToken)

public Task DeleteAllMessageReactionsAsync(ulong messageId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

messageId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteAsync(RestRequestProperties?, CancellationToken)

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

Parameters

properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<TextChannel>

DeleteMessageAsync(ulong, RestRequestProperties?, CancellationToken)

public Task DeleteMessageAsync(ulong messageId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

messageId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteMessageReactionAsync(ulong, ReactionEmojiProperties, RestRequestProperties?, CancellationToken)

public Task DeleteMessageReactionAsync(ulong messageId, ReactionEmojiProperties emoji, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

messageId ulong
emoji ReactionEmojiProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteMessageReactionAsync(ulong, ReactionEmojiProperties, ulong, RestRequestProperties?, CancellationToken)

public Task DeleteMessageReactionAsync(ulong messageId, ReactionEmojiProperties emoji, ulong userId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

messageId ulong
emoji ReactionEmojiProperties
userId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteMessagesAsync(IAsyncEnumerable<ulong>, RestRequestProperties?, CancellationToken)

public Task DeleteMessagesAsync(IAsyncEnumerable<ulong> messageIds, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

messageIds IAsyncEnumerable<ulong>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteMessagesAsync(IEnumerable<ulong>, RestRequestProperties?, CancellationToken)

public Task DeleteMessagesAsync(IEnumerable<ulong> messageIds, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

messageIds IEnumerable<ulong>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

EndMessagePollAsync(ulong, RestRequestProperties?, CancellationToken)

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

Parameters

messageId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<RestMessage>

EnterTypingStateAsync(RestRequestProperties?, CancellationToken)

public Task<IDisposable> EnterTypingStateAsync(RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IDisposable>

GetAsync(RestRequestProperties?, CancellationToken)

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

Parameters

properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<TextChannel>

GetMessageAsync(ulong, RestRequestProperties?, CancellationToken)

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

Parameters

messageId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<RestMessage>

GetMessagePollAnswerVotersAsync(ulong, int, PaginationProperties<ulong>?, RestRequestProperties?)

public IAsyncEnumerable<User> GetMessagePollAnswerVotersAsync(ulong messageId, int answerId, PaginationProperties<ulong>? paginationProperties = null, RestRequestProperties? properties = null)

Parameters

messageId ulong
answerId int
paginationProperties PaginationProperties<ulong>
properties RestRequestProperties

Returns

IAsyncEnumerable<User>

GetMessageReactionsAsync(ulong, ReactionEmojiProperties, MessageReactionsPaginationProperties?, RestRequestProperties?)

public IAsyncEnumerable<User> GetMessageReactionsAsync(ulong messageId, ReactionEmojiProperties emoji, MessageReactionsPaginationProperties? paginationProperties = null, RestRequestProperties? properties = null)

Parameters

messageId ulong
emoji ReactionEmojiProperties
paginationProperties MessageReactionsPaginationProperties
properties RestRequestProperties

Returns

IAsyncEnumerable<User>

GetMessagesAroundAsync(ulong, int?, RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<RestMessage>> GetMessagesAroundAsync(ulong messageId, int? limit = null, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

messageId ulong
limit int?
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<RestMessage>>

GetMessagesAsync(PaginationProperties<ulong>?, RestRequestProperties?)

public IAsyncEnumerable<RestMessage> GetMessagesAsync(PaginationProperties<ulong>? paginationProperties = null, RestRequestProperties? properties = null)

Parameters

paginationProperties PaginationProperties<ulong>
properties RestRequestProperties

Returns

IAsyncEnumerable<RestMessage>

GetPinnedMessagesAsync(RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<RestMessage>> GetPinnedMessagesAsync(RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<RestMessage>>

ModifyMessageAsync(ulong, Action<MessageOptions>, RestRequestProperties?, CancellationToken)

public Task<RestMessage> ModifyMessageAsync(ulong messageId, Action<MessageOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

messageId ulong
action Action<MessageOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<RestMessage>

PinMessageAsync(ulong, RestRequestProperties?, CancellationToken)

public Task PinMessageAsync(ulong messageId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

messageId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

SendMessageAsync(MessageProperties, RestRequestProperties?, CancellationToken)

public Task<RestMessage> SendMessageAsync(MessageProperties message, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

message MessageProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<RestMessage>

TriggerTypingStateAsync(RestRequestProperties?, CancellationToken)

public Task TriggerTypingStateAsync(RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

UnpinMessageAsync(ulong, RestRequestProperties?, CancellationToken)

public Task UnpinMessageAsync(ulong messageId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

messageId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task