> For the complete documentation index, see [llms.txt](https://regex-simplify.lacostar.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://regex-simplify.lacostar.fr/docs/discord/channelmention.md).

# channelMention

{% tabs %}
{% tab title="Function types" %}

```typescript
channelMention(channel: string): { 
    include: boolean, 
    matchs: RegExpMatchArray | null, 
    groups: Array<{ id: string } | null> | null
}
```

{% endtab %}

{% tab title="Code example" %}
**Search channel mention in a string:**

```javascript
const { discord } = require('regex-simplify');

const channel = discord.channelMention(`
    <#584749055578603521>
    <#720256732630351912>
    <#507329636305207308>
`);

console.log(channel);
```

{% endtab %}

{% tab title="Function return" %}

```javascript
{
  include: true,
  matchs: [
    '<#584749055578603521>',
    '<#720256732630351912>',
    '<#507329636305207308>'
  ],
  groups: [
    [Object: null prototype] { id: '584749055578603521' },
    [Object: null prototype] { id: '720256732630351912' },
    [Object: null prototype] { id: '507329636305207308' }
  ]
}
```

{% endtab %}
{% endtabs %}
