Class DiscordClientExtensions
An extension class for the Discord client.
Assembly: Discord.Net.Core.dll​
View Source​
Declaration
public static class DiscordClientExtensions
Methods​
GetPrivateChannelAsync(IDiscordClient, UInt64)​
Gets the private channel with the provided ID.
View Source​
Declaration
public static async Task<IPrivateChannel> GetPrivateChannelAsync(this IDiscordClient client, ulong id)
Returns​
System.Threading.Tasks.Task<Discord.IPrivateChannel>
Parameters​
Type | Name |
---|---|
Discord.IDiscordClient | client |
System.UInt64 | id |
GetDMChannelAsync(IDiscordClient, UInt64)​
Gets the DM channel with the provided ID.
View Source​
Declaration
public static async Task<IDMChannel> GetDMChannelAsync(this IDiscordClient client, ulong id)
Returns​
System.Threading.Tasks.Task<Discord.IDMChannel>
Parameters​
Type | Name |
---|---|
Discord.IDiscordClient | client |
System.UInt64 | id |
GetDMChannelsAsync(IDiscordClient)​
Gets all available DM channels for the client.
View Source​
Declaration
public static async Task<IEnumerable<IDMChannel>> GetDMChannelsAsync(this IDiscordClient client)
Returns​
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Discord.IDMChannel>>
Parameters​
Type | Name |
---|---|
Discord.IDiscordClient | client |
GetGroupChannelAsync(IDiscordClient, UInt64)​
Gets the group channel with the provided ID.
View Source​
Declaration
public static async Task<IGroupChannel> GetGroupChannelAsync(this IDiscordClient client, ulong id)
Returns​
System.Threading.Tasks.Task<Discord.IGroupChannel>
Parameters​
Type | Name |
---|---|
Discord.IDiscordClient | client |
System.UInt64 | id |
GetGroupChannelsAsync(IDiscordClient)​
Gets all available group channels for the client.
View Source​
Declaration
public static async Task<IEnumerable<IGroupChannel>> GetGroupChannelsAsync(this IDiscordClient client)
Returns​
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Discord.IGroupChannel>>
Parameters​
Type | Name |
---|---|
Discord.IDiscordClient | client |
GetOptimalVoiceRegionAsync(IDiscordClient)​
Gets the most optimal voice region for the client.
View Source​
Declaration
public static async Task<IVoiceRegion> GetOptimalVoiceRegionAsync(this IDiscordClient discord)
Returns​
System.Threading.Tasks.Task<Discord.IVoiceRegion>
Parameters​
Type | Name |
---|---|
Discord.IDiscordClient | discord |