WhiskeySockets / Baileys

Lightweight full-featured typescript/javascript WhatsApp Web API
https://baileys.whiskeysockets.io/
MIT License
4.03k stars 1.36k forks source link

[BUG] Waiting for this message #1006

Open SirGateHgL opened 2 months ago

SirGateHgL commented 2 months ago

When using the bot in a group chat, an error or bug will occur "waiting for this message...." but it can run normally in private chat. Screenshot_20240823-162752 Screenshot_20240823-162741

bobslavtriev commented 2 months ago

problem in your code, read the documentation!

CrazyPrince commented 2 months ago

The basis of your bot's code is not good and therefore the messages are not properly examined.

I have an open source base (WhatsApp bot multi device) for you if you want to reply to this message and put a reaction

If you need it

anonphoenix007 commented 2 months ago

The basis of your bot's code is not good and therefore the messages are not properly examined.

I have an open source base (WhatsApp bot multi device) for you if you want to reply to this message and put a reaction

If you need it

Can I get the base?

bobslavtriev commented 1 month ago

Use getMessage

Bobby360Cloud commented 3 weeks ago

Use getMessage

I have used getMessage, but my first message after connecting to the bot is still sent as "waiting for this..."

anonphoenix007 commented 3 weeks ago

Use getMessage

I have used getMessage, but my first message after connecting to the bot is still sent as "waiting for this..."

function removeFiles() { const directoryPath = './taira_baileys'; const excludedFile = 'creds.json';

fs.readdir(directoryPath, (err, files) => {
    if (err) {
        console.error(err);
        return;
    }

    files.forEach((file) => {
        if (file !== excludedFile) {
            const filePath = path.join(directoryPath, file);
            fs.unlink(filePath, (err) => {
                if (err) {
                    console.error(err);
                }
            });
        }
    });
});

}

implement this on your end,to clear pre-keys and sender-key it worked for me.