Construct an AS bot user which has various helper methods.

Param

The client instance configured for the AS bot.

Param

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

Param

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

Hierarchy

  • AppServiceBot

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.

    Returns

    Resolves to a map of user ID => display_name avatar_url

    Parameters

    • roomId: string

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

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

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

    Returns

    Resolves to a list of room IDs.

    Returns Promise<string[]>

  • Parameters

    Returns Promise<RoomInfo>

  • Returns string

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

    Returns

    True if it is a remote user, false otherwise.

    Parameters

    • userId: string

    Returns boolean

Generated using TypeDoc