diff --git a/Example/example.ts b/Example/example.ts index 488f89c5..de271f3d 100644 --- a/Example/example.ts +++ b/Example/example.ts @@ -1,7 +1,7 @@ import { Boom } from '@hapi/boom' import NodeCache from '@cacheable/node-cache' import readline from 'readline' -import makeWASocket, { AnyMessageContent, BinaryInfo, CacheStore, delay, DisconnectReason, downloadAndProcessHistorySyncNotification, encodeWAM, fetchLatestBaileysVersion, generateMessageIDV2, getAggregateVotesInPollMessage, getHistoryMsg, isJidNewsletter, jidDecode, makeCacheableSignalKeyStore, normalizeMessageContent, PatchedMessageWithRecipientJID, proto, useMultiFileAuthState, WAMessageContent, WAMessageKey } from '../src' +import makeWASocket, { AnyMessageContent, BinaryInfo, CacheStore, DEFAULT_CONNECTION_CONFIG, delay, DisconnectReason, downloadAndProcessHistorySyncNotification, encodeWAM, fetchLatestBaileysVersion, generateMessageIDV2, getAggregateVotesInPollMessage, getHistoryMsg, isJidNewsletter, jidDecode, makeCacheableSignalKeyStore, normalizeMessageContent, PatchedMessageWithRecipientJID, proto, useMultiFileAuthState, WAMessageContent, WAMessageKey } from '../src' //import MAIN_LOGGER from '../src/Utils/logger' import open from 'open' import fs from 'fs' @@ -49,6 +49,7 @@ const startSock = async() => { const sock = makeWASocket({ version, logger, + waWebSocketUrl: process.env.SOCKET_URL ?? DEFAULT_CONNECTION_CONFIG.waWebSocketUrl, auth: { creds: state.creds, /** caching makes the store faster to send/recv messages */