Class ContextInfo

Hierarchy

Constructors

Properties

client: Client

Gampang Client

lexer: Lexer
parser: Parser

Accessors

  • get args(): string[]
  • Command's arguments (e.g. "000789xxx")

    Returns string[]

  • get authorNumber(): string
  • Get author phone number of this message.

    Returns

    Returns string

  • get clickedButtons(): undefined | IListResponseMessage | ITemplateButtonReplyMessage | IButtonsResponseMessage
  • Get detail from clicked button

    Returns

    Returns undefined | IListResponseMessage | ITemplateButtonReplyMessage | IButtonsResponseMessage

  • get flags(): string[]
  • Command's flags (e.g. --flag1, --flag2, /flag3)

    Returns string[]

  • get isFromMe(): boolean
  • Is this message from me?

    Returns

    Returns boolean

  • get participant(): undefined | GroupParticipant
  • Get GroupParticipant class.

    Returns

    Returns undefined | GroupParticipant

  • get timestamp(): number
  • Get the timestamp message

    Returns

    Returns number

Methods

  • Create whatsapp poll/vote

    Returns

    Parameters

    • name: string

      Poll name

    • values: string[]

      Poll values (options)

    • selectableOptionsCount: number = values.length

      Selectable options count

    Returns Promise<undefined | Context>

  • Reply a message with audio

    Parameters

    • audio: string | Buffer

      URL/Buffer audio

    • isVN: boolean = false

      Is it voice note?

    • Optional options: AnyMessageContent

      Send message options

    Returns Promise<undefined | Context>

  • Reply a message with photo

    Parameters

    • photo: string | Buffer

      A Photo

    • Optional caption: string

      A Photo caption

    • Optional options: AnyMessageContent

      Send message options

    Returns Promise<undefined | Context>

  • Reply a message with video

    Parameters

    • video: string | Buffer

      Video source want to send.

    • Optional caption: string

      Video caption

    • Optional options: AnyMessageContent

      Send message options

    Returns Promise<undefined | Context>

  • Send raw message

    Returns

    Parameters

    • raw: AnyMessageContent

      AnyMessageContent message options

    • Optional miscOpt: MiscMessageGenerationOptions

      Misc message generation options

    Returns Promise<undefined | Context>

Generated using TypeDoc