@botmesh/core - v2.0.0-alpha.2
    Preparing search index...

    Class Whitelist

    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.

    Hierarchy (View Summary)

    Index
    • Add one id or many. Duplicates are ignored. Throws TypeError on an empty/non-string id.

      Parameters

      • ids: string | readonly string[]

      Returns this

    • Remove one id or many. Unknown ids are ignored. Throws TypeError on an empty/non-string id.

      Parameters

      • ids: string | readonly string[]

      Returns this

    • Is id on the list? Exact, case-sensitive match. Never throws.

      Parameters

      • id: string

      Returns boolean

    • Turn whitelist mode off (open access, subject to the blacklist).

      Returns this

    • get size(): number

      Number of ids on the list.

      Returns number