bot.whitelist — an AccessList plus a mode switch. While disabled
(the default) its entries have no effect. While enabled, only messages whose
senderId OR chatId is on the list are processed; an enabled, empty whitelist
blocks everyone. The blacklist always wins over the whitelist.
Extends
Constructors
Constructor
Returns
Whitelist
Overrides
AccessList.constructor
Properties
name
Inherited from
AccessList.name
Methods
add()
TypeError on an empty/non-string id.
Parameters
Returns
this
Inherited from
AccessList.add
remove()
TypeError on an empty/non-string id.
Parameters
Returns
this
Inherited from
AccessList.remove
has()
id on the list? Exact, case-sensitive match. Never throws.
Parameters
Returns
boolean
Inherited from
AccessList.has
list()
Returns
string[]
Inherited from
AccessList.list
clear()
Returns
this
Inherited from
AccessList.clear
onChange()
Parameters
Returns
() =>void
Inherited from
AccessList.onChange
enable()
Returns
this
disable()
Returns
this
load()
enabled, leaves the current mode untouched.
Parameters
Returns
this
Overrides
AccessList.load
export()
Returns
WhitelistSnapshot
Overrides
AccessList.export
Accessors
size
Get Signature
Returns
number
Inherited from
AccessList.size
enabled
Get Signature
Returns
boolean