lib/components/app-service-bot.js
function AppServiceBot(client, registration, memberCache) {
    this.client = client;
    this.registration = registration.getOutput();
    this.memberCache = memberCache;
    var self = this;
    // yank out the exclusive user ID regex strings
    this.exclusiveUserRegexes = [];
    if (this.registration.namespaces && this.registration.namespaces.users) {
        this.registration.namespaces.users.forEach(function(userEntry) {
            if (!userEntry.exclusive) {
                return;
            }
            self.exclusiveUserRegexes.push(userEntry.regex);
        });
    }
}
function AppServiceBot(client, registration, memberCache) {
    this.client = client;
    this.registration = registration.getOutput();
    this.memberCache = memberCache;
    var self = this;
    // yank out the exclusive user ID regex strings
    this.exclusiveUserRegexes = [];
    if (this.registration.namespaces && this.registration.namespaces.users) {
        this.registration.namespaces.users.forEach(function(userEntry) {
            if (!userEntry.exclusive) {
                return;
            }
            self.exclusiveUserRegexes.push(userEntry.regex);
        });
    }
}
function AppServiceBot ( client , registration , memberCache ) { this . client = client ; this . registration = registration . getOutput ( ) ; this . memberCache = memberCache ; var self = this ; // yank out the exclusive user ID regex strings this . exclusiveUserRegexes = [ ] ; if ( this . registration . namespaces && this . registration . namespaces . users ) { this . registration . namespaces . users . forEach ( function ( userEntry ) { if ( ! userEntry . exclusive ) { return ; } self . exclusiveUserRegexes . push ( userEntry . regex ) ; } ) ; } }
Construct an AS bot user which has various helper methods.
@constructor
@param {MatrixClient} client The client instance configured for the AS bot.
@param {AppServiceRegistration} registration The registration that the bot
is following. Used to determine which user IDs it is controlling.
@param {MembershipCache} memberCache The bridges membership cache instance,
for storing membership the bot has discovered.
Construct an AS bot user which has various helper methods .