{"_id":"@arifzyn/wb","name":"@arifzyn/wb","dist-tags":{"latest":"1.17.22"},"versions":{"1.17.22":{"name":"@arifzyn/wb","version":"1.17.22","description":"Simplicity WhatsApp Bot (Baileys)","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/neoxr/wb.git"},"keywords":["whattapp-bot","whatsapp-api","bot","whatsapp","wabot"],"author":{"name":"ArifzynXD"},"license":"ISC","bugs":{"url":"https://github.com/neoxr/wb/issues"},"homepage":"https://github.com/neoxr/wb#readme","dependencies":{"awesome-phonenumber":"~2.59.0","axios":"~0.24.0","chalk":"~4.1.0","cheerio":"~1.0.0-rc.5","child_process":"~1.0.2","colors":"1.4.0","crypto":"1.0.1","dotenv":"^16.0.1","fs":"0.0.1-security","file-type":"~16.5.2","fluent-ffmpeg":"2.1.2","form-data":"~4.0.0","html-entities":"~2.3.2","jimp":"^0.16.1","mime-types":"~2.1.32","mongodb":"4.9.0","mongoose":"5.10.8","moment-timezone":"~0.5.34","node-cache":"^5.1.2","node-fetch":"2.6.1","node-id3":"^0.2.3","node-webpmux":"^3.1.0","os":"^0.1.2","path":"~0.12.7","pg":"8.7.3","qrcode-terminal":"^0.12.0","rootpath":"^0.1.2","spinnies":"0.5.1","syntax-error":"~1.4.0","util":"~0.12.4"},"_id":"@arifzyn/wb@1.17.22","gitHead":"a62353c7509e8a4476ecdfd1d233b183f00ddd31","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-gh/zXlQ+GoeCkj2Voi+KfymVpt3H64fXYZl+1b8xzCcCHfp7eaYsEewDiHvLEE1gbim5anP86EmV4WrFCb4KLA==","shasum":"7e3d877c98e2522cc56c65245340cccdd0e6f68b","tarball":"https://registry.npmjs.org/@arifzyn/wb/-/wb-1.17.22.tgz","fileCount":18,"unpackedSize":366266,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGxBtyYPsuVr0NIehV3QfoDzBkPOpoYEEAMpPuyyaxFDAiA4rcpmo8YP6Q/yd55fEO3P2sEZGOjAe0L2kwqtDABAPA=="}]},"_npmUser":{"name":"arifzyn","email":"arifzyn906@gmail.com"},"directories":{},"maintainers":[{"name":"arifzyn","email":"arifzyn906@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/wb_1.17.22_1707361261614_0.5654146929546784"},"_hasShrinkwrap":false}},"time":{"created":"2024-02-08T03:01:01.504Z","1.17.22":"2024-02-08T03:01:01.786Z","modified":"2024-02-08T03:01:02.572Z"},"maintainers":[{"name":"arifzyn","email":"arifzyn906@gmail.com"}],"description":"Simplicity WhatsApp Bot (Baileys)","homepage":"https://github.com/neoxr/wb#readme","keywords":["whattapp-bot","whatsapp-api","bot","whatsapp","wabot"],"repository":{"type":"git","url":"git+https://github.com/neoxr/wb.git"},"author":{"name":"ArifzynXD"},"bugs":{"url":"https://github.com/neoxr/wb/issues"},"license":"ISC","readme":"## Simplicity WhatsApp Bot (Baileys)\n\n> This is a WhatsApp bot module based on Baileys which can be used in a very easy way.\n\n### Example\n\nFor example of use you can open the [example](https://github.com/neoxr/wb/tree/master/example) folder or here for [example base](https://github.com/neoxr/wbot)\n\n<p align=\"center\"><img align=\"center\" width=\"100%\" src=\"https://telegra.ph/file/109138edd11434ddcc30d.png\" /></p>\n\n### Handling Events\n\nThere are several events that can be used are as follows :\n\n```Javascript\nclient.on('connect', () => console.log)\nclient.on('error', error => console.log(error))\nclient.on('ready', () => console.log)\nclient.on('message', ctx => console.log(ctx))\nclient.on('message.delete', ctx => console.log(ctx))\nclient.on('group.add', ctx => console.log(ctx))\nclient.on('group.remove', ctx => console.log(ctx))\nclient.on('group.promote', ctx => console.log(ctx))\nclient.on('group.demote', ctx => console.log(ctx))\nclient.on('caller', ctx => console.log(ctx))\nclient.on('presence.update', ctx => console.log(ctx))\n```\n\n### Event Message (message)\n\n```Javascript\n{\n   m: {\n      key: {\n         remoteJid: '6285887776722@s.whatsapp.net',\n         fromMe: false,\n         id: 'A4A5E1FB9C33178CD11673178C46CA1E',\n         participant: undefined\n      },\n      messageTimestamp: 1689557472,\n      pushName: 'Wildan Izzudin',\n      broadcast: false,\n      message: Message {\n         extendedTextMessage: [ExtendedTextMessage],\n         messageContextInfo: [MessageContextInfo]\n      },\n      id: 'A4A5E1FB9C33178CD11673178C46CA1E',\n      isBot: false,\n      chat: '6285887776722@s.whatsapp.net',\n      fromMe: false,\n      isGroup: false,\n      sender: '6285887776722@s.whatsapp.net',\n      mtype: 'extendedTextMessage',\n      msg: ExtendedTextMessage {\n         text: '.menu',\n         previewType: 0,\n         contextInfo: [ContextInfo],\n         inviteLinkGroupTypeV2: 0\n      },\n      quoted: null,\n      mentionedJid: [],\n      reply: [Function(anonymous)],\n      text: '.menu'\n   },\n   body: '.menu',\n   prefix: '.',\n   plugins: [],\n   commands: [],\n   args: [],\n   command: 'menu',\n   text: '',\n   prefixes: ['.', '#', '!', '/']\n}\n```\n### Messaging Function\n\n```Javascript\n// declaration variable sock\nconst sock = client.sock\n\n// send a text message (auto tagged)\nsock.reply(m.chat, `Test!`, m)\n\n// send a react message\nsock.sendReact(m.chat, `💀`, m.key)\n\n// send a text message with progress bar\nsock.sendProgress(m.chat, `Test!`, m)\n\n// send a ptv message from path, url, or buffer (video duration 10s)\nsock.sendPtv(m.chat, `./media/video/yemete.mp4`)\n\n// send a text message with custom thumbnail\nsock.sendMessageModify(m.chat, `Test!`, m, {\n   title: '© neoxr-bot',\n   largeThumb: true,\n   ads: false,\n   /* can buffer or url */\n   thumbnail: 'https://iili.io/HP3ODj2.jpg',\n   link: 'https://chat.whatsapp.com/HYknAquOTrECm9KPJJQO1V'\n})\n\n// send a file from path, url, or buffer (auto extension)\nsock.sendFile(m.chat, 'https://iili.io/HP3ODj2.jpg', 'image.jpg', 'Test!', m)\n\n// send a document from path, url, or buffer (auto extension)\nsock.sendFile(m.chat, 'https://iili.io/HP3ODj2.jpg', 'image.jpg', 'Test!', m, {\n   document: true\n})\n\n// send a voicenote from path, url, or buffer\nsock.sendFile(m.chat, './media/audio/ah.mp3', '', '', m, {\n   ptt: true\n})\n\n// send a audio from path, url, or buffer with thumbnail in audio tag\nsock.sendFile(m.chat, './media/audio/ah.mp3', '', '', m, {\n   APIC: < Buffer >\n})\n\n// send a sticker message from url or buffer\nsock.sendSticker(m.chat, 'https://iili.io/HP3ODj2.jpg', m, {\n   packname: 'Sticker by',\n   author: '© neoxr.js'\n})\n\n// forward message\nsock.copyNForward(m.chat, m)\n```\n","readmeFilename":"README.md"}