Jump to content

Recommended Posts

5 minutes ago, badas said:

Baru saja update ke versi 8.5.0, update lancar.
Dapat bug ketika campaign pakai theme snacked admin tidak bisa

Setelah switch ke dua thema lainnya berjalan normal.
Nunggu apakah nanti nodejs akan idle/stop seperti sebelumnya.
Terima kasih master @Magd Almuntaser

Screenshot 2024-09-16 121238.png

Punyaku sudah 7 jam aman ini no idle lagi. Tidak pake cron job dll.

Sepertinya memang theme snacked akan dihapus di versi 9 nantinya. Karena akan merepotkan mengedit 3 theme setiap versi.

semoga masuk list fix di versi 8.5.1 

2 minutes ago, Unicode said:

Punyaku sudah 7 jam aman ini no idle lagi. Tidak pake cron job dll.

Sepertinya memang theme snacked akan dihapus di versi 9 nantinya. Karena akan merepotkan mengedit 3 theme setiap versi.

semoga masuk list fix di versi 8.5.1 

Semoga aman mas bro

Cari code tersebut di whatsapp.js
 

sock[token].ev.on('connection.update', async (update) => {

 

lalu rubah code tersebut sampai code

    }
});

 

ke code ini
 

sock[token].ev.on('connection.update', async (update) => {
    const { connection, lastDisconnect, qr } = update;

    if (qr) {
        try {
            const url = await QRCode.toDataURL(qr);
            qrcode[token] = url;
            socket?.emit('qrcode', { token, data: url, message: 'Scan this QR code with your WhatsApp' });
        } catch (err) {
            console.error('QR Code generation failed:', err);
        }
    }

    if (connection === 'close') {
        const disconnectError = lastDisconnect?.error;

        if (disconnectError instanceof Boom && 
           (disconnectError.output.statusCode === 403 || disconnectError.output.statusCode === 428)) {
            setStatus(token, 'Disconnect');
            console.log(`Connection closed with status code ${disconnectError.output.statusCode}. You are logged out.`);
            socket?.emit('message', { token, message: `Connection closed with status code ${disconnectError.output.statusCode}. You are logged out.` });
            await clearConnection(token);
            clearInterval(reconnectInterval);
            reconnectInterval = null;
        } else {
            const shouldReconnect = disconnectError instanceof Boom && disconnectError.output.statusCode !== DisconnectReason.loggedOut;
            console.log('Connection closed due to', lastDisconnect?.error, 'Reconnecting:', shouldReconnect);

            if (shouldReconnect) {
                if (!reconnectInterval) {
                    reconnectInterval = setInterval(() => attemptConnection(), 10000);
                }
            } else {
                setStatus(token, 'Disconnect');
                console.log('Connection closed. You are logged out.');
                socket?.emit('message', { token, message: 'Connection closed. You are logged out.' });
                await clearConnection(token);
                clearInterval(reconnectInterval);
                reconnectInterval = null;
            }
        }
    } else if (connection === 'open') {
        setStatus(token, 'Connected');
        console.log('Connected successfully!');
        const userId = `${sock[token].user.id.split(':')[0]}@s.whatsapp.net`;
        const ppUrl = await getPpUrl(token, userId);
        socket?.emit('connection-open', { token, user: sock[token].user, ppUrl });
        delete qrcode[token];
        delete pairingCode[token];
        clearInterval(reconnectInterval);
        reconnectInterval = null;
    }
});

menambahkan status Disconnect jika terdapat error 403 dan 428 (itu adalah code error banned/logout mendadak karna app unofficial dari whatsapp)

jika script bawaan dari mamang magd, jika logout atau di banned, status tidak berubah. saya hanya mengubah sedikit, yang disconnect saya barusan ngeblast dan beberapa mokad nomor nya

image.thumb.png.093f5d3cacedbe30c901f888d0dad1bd.png

Edited by Pebrian
  • Love 2
16 minutes ago, Pebrian said:

Cari code tersebut di whatsapp.js
 

sock[token].ev.on('connection.update', async (update) => {

 

lalu rubah code tersebut sampai code

    }
});

 

ke code ini
 

sock[token].ev.on('connection.update', async (update) => {
    const { connection, lastDisconnect, qr } = update;

    if (qr) {
        try {
            const url = await QRCode.toDataURL(qr);
            qrcode[token] = url;
            socket?.emit('qrcode', { token, data: url, message: 'Scan this QR code with your WhatsApp' });
        } catch (err) {
            console.error('QR Code generation failed:', err);
        }
    }

    if (connection === 'close') {
        const disconnectError = lastDisconnect?.error;

        if (disconnectError instanceof Boom && 
           (disconnectError.output.statusCode === 403 || disconnectError.output.statusCode === 428)) {
            setStatus(token, 'Disconnect');
            console.log(`Connection closed with status code ${disconnectError.output.statusCode}. You are logged out.`);
            socket?.emit('message', { token, message: `Connection closed with status code ${disconnectError.output.statusCode}. You are logged out.` });
            await clearConnection(token);
            clearInterval(reconnectInterval);
            reconnectInterval = null;
        } else {
            const shouldReconnect = disconnectError instanceof Boom && disconnectError.output.statusCode !== DisconnectReason.loggedOut;
            console.log('Connection closed due to', lastDisconnect?.error, 'Reconnecting:', shouldReconnect);

            if (shouldReconnect) {
                if (!reconnectInterval) {
                    reconnectInterval = setInterval(() => attemptConnection(), 10000);
                }
            } else {
                setStatus(token, 'Disconnect');
                console.log('Connection closed. You are logged out.');
                socket?.emit('message', { token, message: 'Connection closed. You are logged out.' });
                await clearConnection(token);
                clearInterval(reconnectInterval);
                reconnectInterval = null;
            }
        }
    } else if (connection === 'open') {
        setStatus(token, 'Connected');
        console.log('Connected successfully!');
        const userId = `${sock[token].user.id.split(':')[0]}@s.whatsapp.net`;
        const ppUrl = await getPpUrl(token, userId);
        socket?.emit('connection-open', { token, user: sock[token].user, ppUrl });
        delete qrcode[token];
        delete pairingCode[token];
        clearInterval(reconnectInterval);
        reconnectInterval = null;
    }
});

menambahkan status Disconnect jika terdapat error 403 dan 428 (itu adalah code error banned/logout mendadak karna app unofficial dari whatsapp)

jika script bawaan dari mamang magd, jika logout atau di banned, status tidak berubah. saya hanya mengubah sedikit, yang disconnect saya barusan ngeblast dan beberapa mokad nomor nya

image.thumb.png.093f5d3cacedbe30c901f888d0dad1bd.png

Versi 8.50 kah om yang mokad, AI Bot belum jalan, dan menu di Auto Replay belom berfungsi, ada solusi

  • Mahmoud changed the title to Whatsapp Gateway | Multi Device v8.5.1
5 minutes ago, Magd Almuntaser said:

I forgot to tell you that if you are using cronjob to reconnect to the idle socket, it should be stopped, it is no longer needed
version
8.5.1 will reconnect to itself when disconnected.

in download still 8.05, plz update

image.thumb.png.07d97417d981accd940415dd17cc6d19.png

image.png.f9d409352533df4b567bc2b0a86f5924.png

 

sudah restart node namun masih seperti ini, QR tidak muncul .

note: menggunakan node 16, ga pakai cronjob sama sekali

btw, untuk .env

APP_DEBUG=true
APP_URL=http://namadomain.com <--- sering ganti sendiri double s menjadi httpss://
WA_URL_SERVER=http://namadomain.com <--- sering ganti sendiri double s menjadi httpss://

Terima kasih 🙏

image.png

Edited by JangE
5 minutes ago, l.o.l said:

in download still 8.05, plz update


no it's 8.5.1:
 

https://doniaweb.com/files/file/4872-whatsapp-gateway-multi-device/


 

5 minutes ago, JangE said:

image.thumb.png.07d97417d981accd940415dd17cc6d19.png

image.png.f9d409352533df4b567bc2b0a86f5924.png

 

sudah restart node namun masih seperti ini, QR tidak muncul .

note: menggunakan node 16, ga pakai cronjob sama sekali

btw, untuk .env

APP_DEBUG=true
APP_URL=http://namadomain.com <--- sering ganti sendiri double s menjadi httpss://
WA_URL_SERVER=http://namadomain.com <--- sering ganti sendiri double s menjadi httpss://

Terima kasih 🙏

image.png


Node 16 sudah tidak didukung lagi di versi ini. Anda harus menginstal Node 18 atau 20 ke atas.
===========
Node 16 is no longer supported in this version.. You must install 18 or 20 and above.

  • Love 1
10 minutes ago, Magd Almuntaser said:


no it's 8.5.1:
 

https://doniaweb.com/files/file/4872-whatsapp-gateway-multi-device/


 


Node 16 sudah tidak didukung lagi di versi ini. Anda harus menginstal Node 18 atau 20 ke atas.
===========
Node 16 is no longer supported in this version.. You must install 18 or 20 and above.

dear tuan, saya sudah ganti / mencoba  node 16 ke atas, mode develope dan production. tetap QR tidak muncul. keadaan masih sama 
Regards 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
  • Create New...