@@ -6,16 +6,16 @@
|
||||
*
|
||||
* Usage: npx tsx src/whatsapp-auth.ts
|
||||
*/
|
||||
|
||||
import makeWASocket, {
|
||||
useMultiFileAuthState,
|
||||
DisconnectReason,
|
||||
makeCacheableSignalKeyStore,
|
||||
} from '@whiskeysockets/baileys';
|
||||
import pino from 'pino';
|
||||
import qrcode from 'qrcode-terminal';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import pino from 'pino';
|
||||
import qrcode from 'qrcode-terminal';
|
||||
|
||||
import makeWASocket, {
|
||||
DisconnectReason,
|
||||
makeCacheableSignalKeyStore,
|
||||
useMultiFileAuthState,
|
||||
} from '@whiskeysockets/baileys';
|
||||
|
||||
const AUTH_DIR = './store/auth';
|
||||
|
||||
@@ -30,7 +30,9 @@ async function authenticate(): Promise<void> {
|
||||
|
||||
if (state.creds.registered) {
|
||||
console.log('✓ Already authenticated with WhatsApp');
|
||||
console.log(' To re-authenticate, delete the store/auth folder and run again.');
|
||||
console.log(
|
||||
' To re-authenticate, delete the store/auth folder and run again.',
|
||||
);
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user