Add one id or many. Duplicates are ignored. Throws TypeError on an empty/non-string id.
Remove one id or many. Unknown ids are ignored. Throws TypeError on an empty/non-string id.
Is id on the list? Exact, case-sensitive match. Never throws.
The ids on the list, in insertion order (a copy).
Remove every id.
Subscribe to effective mutations (no-op calls do not notify). Returns an unsubscriber. A throwing listener never breaks the mutation that triggered it.
Turn whitelist mode on.
Turn whitelist mode off (open access, subject to the blacklist).
Replace the contents from a snapshot. A bare id array, or a snapshot without
enabled, leaves the current mode untouched.
JSON-serializable snapshot for host-side persistence.
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.