@neoxr/wb 2.3.7 → 2.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@neoxr/wb",
3
- "version":"2.3.7",
3
+ "version":"2.3.8",
4
4
  "description":"Simplicity WhatsApp Bot (Baileys)",
5
5
  "main":"index.js",
6
6
  "scripts":{
@@ -376,6 +376,20 @@ module.exports = class Function {
376
376
  ...options
377
377
  }
378
378
  })
379
+ mg.on('error', (err) => {
380
+ if (err.statusCode > 400) {
381
+ resolve({
382
+ status: false,
383
+ msg: `[${err.statusCode}] : Error while gwtting file`
384
+ })
385
+ } else {
386
+ resolve({
387
+ status: false,
388
+ msg: `[${err.message}] : Error while gwtting file`
389
+ })
390
+ }
391
+ mg.destroy()
392
+ })
379
393
  mg.on('response', (response) => {
380
394
  if (response.statusCode !== 200) {
381
395
  resolve({