Class DiscordClientExtensions
An extension class for the Discord client.
Inheritance
System.Object
DiscordClientExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Discord
Assembly: Discord.Net.Core.dll
Syntax
public static class DiscordClientExtensions
Methods
| Improve this Doc View SourceGetDMChannelAsync(IDiscordClient, UInt64)
Gets the DM channel with the provided ID.
Declaration
public static Task<IDMChannel> GetDMChannelAsync(this IDiscordClient client, ulong id)
Parameters
| Type | Name | Description |
|---|---|---|
| IDiscordClient | client | |
| System.UInt64 | id |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<IDMChannel> |
GetDMChannelsAsync(IDiscordClient)
Gets all available DM channels for the client.
Declaration
public static Task<IEnumerable<IDMChannel>> GetDMChannelsAsync(this IDiscordClient client)
Parameters
| Type | Name | Description |
|---|---|---|
| IDiscordClient | client |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<IDMChannel>> |
GetGroupChannelAsync(IDiscordClient, UInt64)
Gets the group channel with the provided ID.
Declaration
public static Task<IGroupChannel> GetGroupChannelAsync(this IDiscordClient client, ulong id)
Parameters
| Type | Name | Description |
|---|---|---|
| IDiscordClient | client | |
| System.UInt64 | id |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<IGroupChannel> |
GetGroupChannelsAsync(IDiscordClient)
Gets all available group channels for the client.
Declaration
public static Task<IEnumerable<IGroupChannel>> GetGroupChannelsAsync(this IDiscordClient client)
Parameters
| Type | Name | Description |
|---|---|---|
| IDiscordClient | client |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<IGroupChannel>> |
GetOptimalVoiceRegionAsync(IDiscordClient)
Gets the most optimal voice region for the client.
Declaration
public static Task<IVoiceRegion> GetOptimalVoiceRegionAsync(this IDiscordClient discord)
Parameters
| Type | Name | Description |
|---|---|---|
| IDiscordClient | discord |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<IVoiceRegion> |
GetPrivateChannelAsync(IDiscordClient, UInt64)
Gets the private channel with the provided ID.
Declaration
public static Task<IPrivateChannel> GetPrivateChannelAsync(this IDiscordClient client, ulong id)
Parameters
| Type | Name | Description |
|---|---|---|
| IDiscordClient | client | |
| System.UInt64 | id |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<IPrivateChannel> |