Options
All
  • Public
  • Public/Protected
  • All
Menu

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.

Hierarchy

  • AppServiceBot

Index

Constructors

constructor

Methods

getClient

  • getClient(): MatrixClient

getJoinedMembers

  • getJoinedMembers(roomId: string): Promise<Record<string, { avatar_url?: string; display_name?: string }>>
  • 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

getJoinedRooms

  • getJoinedRooms(): Promise<string[]>

getRoomInfo

getUserId

  • getUserId(): string

isRemoteUser

  • isRemoteUser(userId: string): boolean
  • 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