Discore
Show / Hide Table of Contents

Method DeleteChannel

| Improve this Doc View Source

DeleteChannel(Snowflake)

Deletes a guild channel, or closes a DM.

Requires ManageChannels if deleting a guild channel.

Declaration
public Task<DiscordChannel> DeleteChannel(Snowflake channelId)
Parameters
Type Name Description
Snowflake channelId
Returns
Type Description
Task<DiscordChannel>
Exceptions
Type Condition
DiscordHttpApiException
| Improve this Doc View Source

DeleteChannel(DiscordChannel)

Deletes a guild channel, or closes a DM.

Requires ManageChannels if deleting a guild channel.

Declaration
public Task<DiscordChannel> DeleteChannel(DiscordChannel channel)
Parameters
Type Name Description
DiscordChannel channel
Returns
Type Description
Task<DiscordChannel>
Exceptions
Type Condition
ArgumentNullException

Thrown if channel is null.

DiscordHttpApiException
| Improve this Doc View Source

DeleteChannel<T>(T)

Deletes a guild channel, or closes a DM.

Requires ManageChannels if deleting a guild channel.

Declaration
public Task<T> DeleteChannel<T>(T channel) where T : DiscordChannel
Parameters
Type Name Description
T channel
Returns
Type Description
Task<T>
Type Parameters
Name Description
T
Exceptions
Type Condition
ArgumentNullException

Thrown if channel is null.

DiscordHttpApiException
| Improve this Doc View Source

DeleteChannel<T>(Snowflake)

Deletes a guild channel, or closes a DM.

Requires ManageChannels if deleting a guild channel.

Declaration
public Task<T> DeleteChannel<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
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX