Class: RaidSettings

RaidBlock~ RaidSettings

Container for RaidBlock related settings.

new RaidSettings( [enabled] [, numJoin] [, timeInterval] [, duration] [, action] [, warnMessage] [, sendWarning])

Create a settings object.
Parameters:
Name Type Argument Default Description
enabled boolean <optional>
false Is raid protection enabled.
numJoin number <optional>
5 Number of users joined in given time.
timeInterval number <optional>
10000 Time interval for checking number of users joined.
duration number <optional>
600000 Amount of time to be in automated lockdown.
action string <optional>
'kick' Action to perform during lockdown.
warnMessage string <optional>
<nullable>
null DM message to send.
sendWarning boolean <optional>
false Should send DM.
Source:

Members


<private> _updated

Was this modified since our last save.
Source:

action :string

Action to perform, while on lockdown, to new member who join. Possible values are `kick`, `ban`, or `mute`.
Type:
  • string
Default Value:
  • 'kick'
Source:

duration :number

Amount of time to stay on lockdown after a raid has been detected to have ended.
Type:
  • number
Default Value:
  • 600000 (10 Minutes)
Source:

enabled :boolean

Is raid protection enabled.
Type:
  • boolean
Default Value:
  • false
Source:

history :Array.<{time: number, id: string}>

History of previous member who joined the server within the time interval. Time is timestamp of join, and id is user's account id.
Type:
  • Array.<{time: number, id: string}>
Default Value:
  • []
Source:

numJoin :number

Number of users joined within the configured time interval to be considered a raid.
Type:
  • number
Default Value:
  • 5
Source:

sendWarning :boolean

Should we additionally send `warnMessage` in a DM to the user prior to performing the action during a lockdown.
Type:
  • boolean
Source:

<nullable> start :number

Current raid block state information. Not null is if server has had a lockdown, start is the last timestamp we consider the raid to be active, or null if no raid is active.
Type:
  • number
Source:

timeInterval :number

Amount of time for if too many players join, it will be considered a raid. Time in milliseconds.
Type:
  • number
Default Value:
  • 10000
Source:

warnMessage :string

Message to send to users when they are being warned that the raid lockdown is active.
Type:
  • string
Source:

Methods


<static> from(obj)

Create a RaidSettings object from a similarly structured object. Similar to copy-constructor.
Parameters:
Name Type Description
obj object Object to convert to RaidSettings.
Source:
Returns:
Created raidsettings object.
Type
RaidBlock~RaidSettings

updated()

Queue this to be saved to disk.
Source: