API-XX commited on
Commit
7bb1740
Β·
verified Β·
1 Parent(s): c147d16

Upload case.js

Browse files
Files changed (1) hide show
  1. case.js +3 -6
case.js CHANGED
@@ -4036,8 +4036,7 @@ case 'vv2': {
4036
  }
4037
 
4038
  let mime = (m.quoted.msg || m.quoted).mimetype || '';
4039
- let userJid = m.sender; // Get the sender's number to send privately
4040
-
4041
  try {
4042
  if (/image/.test(mime)) {
4043
  let media = await m.quoted.download();
@@ -4058,15 +4057,13 @@ case 'vv2': {
4058
  await conn.sendMessage(userJid, {
4059
  audio: media,
4060
  mimetype: 'audio/mpeg',
4061
- ptt: false // Set to true if you want to send as a voice note
4062
  });
4063
 
4064
  } else {
4065
  reply(`❌ Unsupported media type!\nReply to an image, video, or audio with *${prefix + command}*`);
4066
  }
4067
-
4068
- reply(`βœ… *Your media has been sent to your private chat!*`);
4069
-
4070
  } catch (err) {
4071
  console.error('Error forwarding media:', err);
4072
  reply(`❌ Failed to send media to private chat. Please try again.`);
 
4036
  }
4037
 
4038
  let mime = (m.quoted.msg || m.quoted).mimetype || '';
4039
+ let userJid = m.sender;
 
4040
  try {
4041
  if (/image/.test(mime)) {
4042
  let media = await m.quoted.download();
 
4057
  await conn.sendMessage(userJid, {
4058
  audio: media,
4059
  mimetype: 'audio/mpeg',
4060
+ ptt: false
4061
  });
4062
 
4063
  } else {
4064
  reply(`❌ Unsupported media type!\nReply to an image, video, or audio with *${prefix + command}*`);
4065
  }
4066
+ await loading ();
 
 
4067
  } catch (err) {
4068
  console.error('Error forwarding media:', err);
4069
  reply(`❌ Failed to send media to private chat. Please try again.`);