• Parameters

    • token: string

      The token used for authentication with the Discord API.

    • channelId: string

      The ID of the channel to delete.

    Returns Promise<void>

    A promise that resolves to void when the channel is successfully deleted.

    Throws

    Will throw an error if there is a problem deleting the channel.

    Example

    const token = 'your_discord_token_here'
    const channelId = 'your_channel_id_here'

    const run = async () => {
    try {
    await deleteChannel(token, channelId)
    console.log('Channel deleted successfully.')
    } catch (error) {
    console.error(`Error: ${error.message}`)
    }
    }

    run()

Generated using TypeDoc