> For the complete documentation index, see [llms.txt](https://dbd-ts.gitbook.io/dbdts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dbd-ts.gitbook.io/dbdts/functions/channelid.md).

# $channelID

Returns the channel's ID.

### Usage

```php
$channelID or $channelID[channelName]
```

This function has one param.

| Param       | Description                                           | Type      | Required |
| ----------- | ----------------------------------------------------- | --------- | -------- |
| channelName | The channel name to return the channel ID for. **\*** | Snowflake | No       |

**\*** If `channelName` isn't provided, then the current channel ID is returned.

### Example

```javascript
bot.commands.add({
    type: "basicCommand",
    name: "channel",
    code: `channelID: $channelID
    channelMentions: <#$channelID>
    channelName: $channelName`
})
```
