Encrypto27
commited on
Commit
·
0704112
1
Parent(s):
d08c971
hard encrypt plugin
Browse files- package.json +2 -1
- plugins/hardencrypt.js +8 -4
package.json
CHANGED
|
@@ -44,6 +44,7 @@
|
|
| 44 |
"@mrnima/tiktok-downloader":"1.0.0",
|
| 45 |
"@mrnima/facebook-downloader":"1.0.0",
|
| 46 |
"mrnima-moviedl":"1.0.0",
|
| 47 |
-
"uglify-js": "^3.18.6"
|
|
|
|
| 48 |
}
|
| 49 |
}
|
|
|
|
| 44 |
"@mrnima/tiktok-downloader":"1.0.0",
|
| 45 |
"@mrnima/facebook-downloader":"1.0.0",
|
| 46 |
"mrnima-moviedl":"1.0.0",
|
| 47 |
+
"uglify-js": "^3.18.6" ,
|
| 48 |
+
"uglify-es": "^3.3.9"
|
| 49 |
}
|
| 50 |
}
|
plugins/hardencrypt.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
const { minify } = require('uglify-
|
| 2 |
|
| 3 |
const config = require('../config');
|
| 4 |
const { cmd, commands } = require('../command');
|
|
@@ -6,7 +6,7 @@ const { fetchJson } = require('../lib/functions'); // Assuming this fetches JSON
|
|
| 6 |
|
| 7 |
cmd({
|
| 8 |
pattern: 'obfuscate',
|
| 9 |
-
alias: ['
|
| 10 |
react: '🗿',
|
| 11 |
desc: 'Minifies JavaScript code (using UglifyJS).', // Update description
|
| 12 |
category: 'main',
|
|
@@ -57,7 +57,11 @@ cmd({
|
|
| 57 |
|
| 58 |
await conn.sendMessage(m.chat, { text: code }, { quoted: m });
|
| 59 |
} catch (error) {
|
| 60 |
-
|
| 61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
}
|
| 63 |
});
|
|
|
|
| 1 |
+
const { minify } = require('uglify-es'); // Corrected import
|
| 2 |
|
| 3 |
const config = require('../config');
|
| 4 |
const { cmd, commands } = require('../command');
|
|
|
|
| 6 |
|
| 7 |
cmd({
|
| 8 |
pattern: 'obfuscate',
|
| 9 |
+
alias: ['obf'],
|
| 10 |
react: '🗿',
|
| 11 |
desc: 'Minifies JavaScript code (using UglifyJS).', // Update description
|
| 12 |
category: 'main',
|
|
|
|
| 57 |
|
| 58 |
await conn.sendMessage(m.chat, { text: code }, { quoted: m });
|
| 59 |
} catch (error) {
|
| 60 |
+
if (error.message === "Cannot read properties of undefined (reading 'match')") {
|
| 61 |
+
reply("Invalid JavaScript code provided. Please check for syntax errors.");
|
| 62 |
+
} else {
|
| 63 |
+
console.error(error);
|
| 64 |
+
reply(`An error occurred: ${error.message}`);
|
| 65 |
+
}
|
| 66 |
}
|
| 67 |
});
|