> 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/rolemention.md).

# roleMention

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

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

{% endtab %}

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

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

const role = discord.roleMention(`
    <@&783057923076653136>
    <@&830426254977138688>
    <@&830426294890004490>
`);

console.log(role);
```

{% endtab %}

{% tab title="Function return" %}

```javascript
{
  include: true,
  matchs: [
    '<@&783057923076653136>',
    '<@&830426254977138688>',
    '<@&830426294890004490>'
  ],
  groups: [
    [Object: null prototype] { id: '783057923076653136' },
    [Object: null prototype] { id: '830426254977138688' },
    [Object: null prototype] { id: '830426294890004490' } 
  ]
}
```

{% endtab %}
{% endtabs %}
