Constructor
new BanUserRequest(userId, messageopt, banModeopt, delaySecondsopt, durationHoursopt)
Creates a new instance of the BanUserRequest class.
Pass the instance to the SmartFox#send method to validate and execute the request.
Pass the instance to the SmartFox#send method to validate and execute the request.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
userId | number | The id of the User to be banned. | ||
message | string | <optional> | null | A custom message to be delivered to the User before the banning occurs; if null, the preset message configured in the SmartFoxServer Administration Tool is used. |
banMode | number | <optional> | BanMode.BY_NAME | One of the ban modes defined in the BanMode class. |
delaySeconds | number | <optional> | 5 | The delay in seconds before the User is banned after receiving the ban message. |
durationHours | number | <optional> | 24 | The duration of the banishment, expressed in hours. |