Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

205
Vistas
WhatsApp Bot Commands didn't work when I execute

Sorry for asking again

I was making a commands in My WhatsApp Bots using whatsapp-web.js module, I made it so that Only I can execute the Command

When I test it, it just didn't execute

I already read the documentation and try use if (chat.isMe) { and if (contact.isMe) { but still no result.

Did I write it wrong?

The Code:

client.on('message', async msg => {
    if (msg.body == '.pin') {
        if (contact.isMe) {
            const chat = await msg.getChat();
            await chat.pin();
            msg.reply('This *chat* has been pinned by *Owner*.');
            console.log('[CHAT_PINNED] You were pinned Chat or Group!');
        } else {
            msg.reply('This *Owner!*');
        }
    }
});
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda