Method GetChannel
| Improve this Doc View SourceGetChannel(Snowflake)
Gets a DM or guild channel by ID.
Declaration
public Task<DiscordChannel> GetChannel(Snowflake channelId)
Parameters
| Type | Name | Description |
|---|---|---|
| Snowflake | channelId |
Returns
| Type | Description |
|---|---|
| Task<DiscordChannel> |
Exceptions
| Type | Condition |
|---|---|
| DiscordHttpApiException |
GetChannel<T>(Snowflake)
Gets a DM or guild channel by ID.
Declaration
public Task<T> GetChannel<T>(Snowflake channelId) where T : DiscordChannel
Parameters
| Type | Name | Description |
|---|---|---|
| Snowflake | channelId |
Returns
| Type | Description |
|---|---|
| Task<T> |
Type Parameters
| Name | Description |
|---|---|
| T |
Exceptions
| Type | Condition |
|---|---|
| DiscordHttpApiException |