Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Constructors

constructor

Methods

getClient

  • getClient(): any

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

  • getRoomInfo(roomId: string, joinedRoom?: { state?: undefined | { events: StateLookupEvent[] } }): Promise<{ id: string; realJoinedUsers: string[]; remoteJoinedUsers: string[]; state: StateLookupEvent[] }>

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