Construct an AS bot user which has various helper methods.

Param: client

The client instance configured for the AS bot.

Param: registration

The registration that the bot is following. Used to determine which user IDs it is controlling.

Param: memberCache

The bridges membership cache instance, for storing membership the bot has discovered.

Constructors

  • Parameters

    • client: MatrixClient
    • userId: string
    • registration: AppServiceRegistration
    • memberCache: MembershipCache

    Returns AppServiceBot

Methods

  • Returns MatrixClient

  • Get a map of joined user IDs for the given room ID. The values in the map are objects with a 'display_name' and 'avatar_url' properties. These properties may be null.

    Parameters

    • roomId: string

      The room to get a list of joined user IDs in.

    Returns Promise<Record<string, {
        avatar_url?: string;
        display_name?: string;
    }>>

    Resolves to a map of user ID => display_name avatar_url

  • Get a list of joined room IDs for the AS bot.

    Returns Promise<string[]>

    Resolves to a list of room IDs.

  • Parameters

    Returns Promise<RoomInfo>

  • Returns string

  • Test a userId to determine if it's a user within the exclusive regexes of the bridge.

    Parameters

    • userId: string

    Returns boolean

    True if it is a remote user, false otherwise.

Generated using TypeDoc