Table of Contents

Class GroupDMChannel

Namespace
NetCord
Assembly
NetCord.dll

Represents a text channel for private messages, with up to 10 users.

public class GroupDMChannel : DMChannel, IEquatable<Entity>, IJsonModel<JsonChannel>, IInteractionChannel, INamedChannel, IEntity, ISpanFormattable, IFormattable
Inheritance
GroupDMChannel
Implements
Inherited Members

Constructors

GroupDMChannel(JsonChannel, RestClient)

Represents a text channel for private messages, with up to 10 users.

public GroupDMChannel(JsonChannel jsonModel, RestClient client)

Parameters

jsonModel JsonChannel
client RestClient

Properties

ApplicationId

The ID corresponding to the application managing the group channel, if any, otherwise null.

public ulong? ApplicationId { get; }

Property Value

ulong?

IconHash

The group channel's icon hash.

public string? IconHash { get; }

Property Value

string

Managed

Whether the group channel is managed by an application with GroupDMCreate set.

public bool Managed { get; }

Property Value

bool

Name

The group channel's name.

public string Name { get; }

Property Value

string

OwnerId

The ID corresponding to the group channel's owner.

public ulong OwnerId { get; }

Property Value

ulong

Methods

AddUserAsync(ulong, GroupDMChannelUserAddProperties, RestRequestProperties?, CancellationToken)

Adds a recipient to a group DM channel.

public Task AddUserAsync(ulong userId, GroupDMChannelUserAddProperties groupDMChannelUserAddProperties, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

userId ulong

The ID of the user to add.

groupDMChannelUserAddProperties GroupDMChannelUserAddProperties

Properties for adding the user, such as access tokens.

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

DeleteAsync(RestRequestProperties?, CancellationToken)

Deletes a channel.

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

DeleteUserAsync(ulong, RestRequestProperties?, CancellationToken)

Removes a recipient from a group DM channel.

public Task DeleteUserAsync(ulong userId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

userId ulong

The ID of the user to remove.

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

GetAsync(RestRequestProperties?, CancellationToken)

Retrieves a channel by its ID.

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

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

Modifies a group DM channel's properties.

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

Parameters

action Action<GroupDMChannelOptions>

An action delegate used to configure the channel's updated properties.

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