Class DMChannel
- Namespace
- NetCord
- Assembly
- NetCord.dll
Represents a text channel for private messages between two users.
public class DMChannel : TextChannel, IEquatable<Entity>, IJsonModel<JsonChannel>, IInteractionChannel, IEntity, ISpanFormattable, IFormattable
- Inheritance
-
DMChannel
- Implements
- Derived
- Inherited Members
Constructors
DMChannel(JsonChannel, RestClient)
Represents a text channel for private messages between two users.
public DMChannel(JsonChannel jsonModel, RestClient client)
Parameters
jsonModelJsonChannelclientRestClient
Properties
Users
A list of the users present in the private channel, indexed by their IDs.
public IReadOnlyDictionary<ulong, User> Users { get; }
Property Value
Methods
CreateFromJson(JsonChannel, RestClient)
public static DMChannel CreateFromJson(JsonChannel jsonModel, RestClient client)
Parameters
jsonModelJsonChannelclientRestClient
Returns
DeleteAsync(RestRequestProperties?, CancellationToken)
Deletes a channel.
public Task<DMChannel> DeleteAsync(RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Parameters
propertiesRestRequestPropertiesOptional properties to customize the request, can be null.
cancellationTokenCancellationTokenA token that can be used to cancel the operation before it completes.
Returns
GetAsync(RestRequestProperties?, CancellationToken)
Retrieves a channel by its ID.
public Task<DMChannel> GetAsync(RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Parameters
propertiesRestRequestPropertiesOptional properties to customize the request, can be null.
cancellationTokenCancellationTokenA token that can be used to cancel the operation before it completes.