ban
Bans the player.
Syntax
player.ban(reason, duration);
Parameters
Name | Type | Description |
---|---|---|
reason | string | The reason for the ban. |
duration (optional) | number | The duration of the ban in seconds. If not specified, the ban will be permanent. |
Returns
Promise<PlayerBanStatus>
- The PlayerBanStatus object.
Example
// perm ban a player
await player.ban('Cheating');
// temp ban a player for 1 hour
await player.ban('Cheating', 3600);
Available on: Client Server