From 36a473fa146f0c6e3d05ee9a932566fba5890ce2 Mon Sep 17 00:00:00 2001 From: julien Date: Tue, 6 May 2025 12:19:47 +0200 Subject: [PATCH] fffggggg --- index.js | 23 ++++++----------------- package.json | 1 - 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/index.js b/index.js index 49f9468..b4e04b8 100644 --- a/index.js +++ b/index.js @@ -1,20 +1,9 @@ -import * as baileys from '@whiskeysockets/baileys'; -const { - default: makeWASocket, - useMultiFileAuthState, - DisconnectReason, - fetchLatestBaileysVersion -} = baileys; - -import express from 'express'; -import { Boom } from '@hapi/boom'; -import qrcode from 'qrcode'; -import fs from 'fs'; -import path from 'path'; -import { fileURLToPath } from 'url'; - -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); +const { default: makeWASocket, useMultiFileAuthState, DisconnectReason, fetchLatestBaileysVersion } = require('@whiskeysockets/baileys'); +const express = require('express'); +const { Boom } = require('@hapi/boom'); +const qrcode = require('qrcode'); +const path = require('path'); +const fs = require('fs'); const app = express(); app.use(express.json()); diff --git a/package.json b/package.json index 29299cb..6f3734e 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,6 @@ "name": "baileys-whatsapp-api", "version": "1.0.0", "description": "API WhatsApp multi-device avec Baileys", - "type": "module", "scripts": { "start": "node index.js" },