Options
All
  • Public
  • Public/Protected
  • All
Menu

Module ChatThreadUtils

since

2.0.0

Index

Variables

Const SYMBOL

SYMBOL: symbol = BotyoSymbol.forName("ChatThreadUtils")

Methods

forEachParticipantInEachChatThread

getChatThreadIds

getFirstName

getFirstNameByMessage

  • getFirstNameByMessage(msg: Message): string
  • Returns the first name of the user that sent the supplied message. The user must be a part of at least one chat thread Botyo listens to.

    since

    2.0.0

    Parameters

    Returns string

getName

  • Returns the user's full name. The user must be a part of at least one chat thread Botyo listens to.

    since

    2.0.0

    Parameters

    Returns string

getNameByMessage

  • getNameByMessage(msg: Message): string
  • Return the full name of the user that sent the supplied message. The user must be a part of at least one chat thread Botyo listens to.

    since

    2.0.0

    Parameters

    Returns string

getNickname

  • Returns the chat-thread-specific nickname of a participant, given a threadId and a participantId.

    since

    2.0.0

    Parameters

    Returns string | undefined

    the nickname, or undefined if it's not set

getNicknameByMessage

  • getNicknameByMessage(msg: Message): string | undefined
  • Returns the chat-thread-specific nickname of the participant that sent the supplied message.

    since

    2.0.0

    Parameters

    Returns string | undefined

    the nickname, or undefined if it's not set

getParticipantIdByAddressee

  • Returns the ID of the user that is the addressee of an action. For example, in the command '#quote Jeff' the addressee would be 'Jeff'.

    This works by comparing the similarity of the supplied addressee string to aliases, nicknames, first names, full names, and vanity names of the participants in the specified thread, in that order.

    since

    2.0.0

    Parameters

    Returns FacebookId | undefined

    the ID of the user, or undefined if there are no matches over a certain similarity threshold

Generated using TypeDoc