Options
All
  • Public
  • Public/Protected
  • All
Menu

Module controllers/initializer

Index

Variables

Functions

Variables

Let screenshot

screenshot: any

Functions

create

  • Used to initialize the client session.

    Note It is required to set all config variables as ConfigObject that includes both sessionId. Setting the session id as the first variable is no longer valid

    e.g

    create({
    sessionId: 'main',
    customUserAgent: ' 'WhatsApp/2.16.352 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Safari/605.1.15',
    blockCrashLogs true,
    ...
    })....
    

    Parameters

    • config: ConfigObject = {}

      ConfigObject] The extended custom configuration

    Returns Promise<Client>

getAndInjectLicense

  • getAndInjectLicense(page: Page, config: ConfigObject, me: { _serialized: string }, debugInfo: SessionInfo, spinner?: Spin, preloadedLicense?: string | false): Promise<boolean>
  • Parameters

    • page: Page
    • config: ConfigObject
    • me: { _serialized: string }
      • _serialized: string
    • debugInfo: SessionInfo
    • Optional spinner: Spin
    • Optional preloadedLicense: string | false

    Returns Promise<boolean>