> For the complete documentation index, see [llms.txt](https://qacam.qacentral.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://qacam.qacentral.org/api-reference/allowroles.md).

# AllowRoles()

Set Discord roles allowed to join. This function allows to optionally set a time at which users will be allowed to join.

{% hint style="info" %}
This method is not idempotent, which means that if you call it multiple times, only the roles specified will be updated and roles set in previous calls that are not included in the call will stay unchanged.
{% endhint %}

{% hint style="warning" %}
The order in which this method is called influences the final configuration.
{% endhint %}

```lua
AllowRoles(roles: { string }, unix_epoch: number?): nil
```

## Parameters

`roles` <mark style="color:blue;">{ string }</mark>\
A table of role IDs to be whitelisted

`unix_epoch` <mark style="color:blue;">number?</mark>\
Seconds representing a point in time since January 1st 1970 00:00 UTC
