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
jsonModelJsonChannelclientRestClient
Properties
ApplicationId
The ID corresponding to the application managing the group channel, if any, otherwise null.
public ulong? ApplicationId { get; }
Property Value
IconHash
The group channel's icon hash.
public string? IconHash { get; }
Property Value
Managed
Whether the group channel is managed by an application with GroupDMCreate set.
public bool Managed { get; }
Property Value
Name
The group channel's name.
public string Name { get; }
Property Value
OwnerId
The ID corresponding to the group channel's owner.
public ulong OwnerId { get; }
Property Value
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
userIdulongThe ID of the user to add.
groupDMChannelUserAddPropertiesGroupDMChannelUserAddPropertiesProperties for adding the user, such as access tokens.
propertiesRestRequestPropertiesOptional properties to customize the request, can be null.
cancellationTokenCancellationTokenA token that can be used to cancel the operation before it completes.
Returns
DeleteAsync(RestRequestProperties?, CancellationToken)
Deletes a channel.
public Task<GroupDMChannel> 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
DeleteUserAsync(ulong, RestRequestProperties?, CancellationToken)
Removes a recipient from a group DM channel.
public Task DeleteUserAsync(ulong userId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Parameters
userIdulongThe ID of the user to remove.
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<GroupDMChannel> 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.
Returns
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
actionAction<GroupDMChannelOptions>An action delegate used to configure the channel's updated properties.
propertiesRestRequestPropertiesOptional properties to customize the request, can be null.
cancellationTokenCancellationTokenA token that can be used to cancel the operation before it completes.