Remove image sending capabilities - cant be tested

This commit is contained in:
fat-operator
2026-03-06 23:48:54 +00:00
parent fdd161d7b2
commit 8c25897532
4 changed files with 1371 additions and 44 deletions

View File

@@ -16,7 +16,7 @@ import makeWASocket, {
import { Boom } from '@hapi/boom';
import qrcode from 'qrcode-terminal';
import pino from 'pino';
import { writeFile, mkdir, readFile } from 'fs/promises';
import { writeFile, mkdir } from 'fs/promises';
import { join } from 'path';
import { homedir } from 'os';
import { randomBytes } from 'crypto';
@@ -217,18 +217,6 @@ export class WhatsAppClient {
await this.sock.sendMessage(to, { text });
}
async sendImage(to: string, imagePath: string, caption?: string): Promise<void> {
if (!this.sock) {
throw new Error('Not connected');
}
const buffer = await readFile(imagePath);
await this.sock.sendMessage(to, {
image: buffer,
caption: caption || undefined,
});
}
async disconnect(): Promise<void> {
if (this.sock) {
this.sock.end(undefined);