{ | |
"id": "54fc8b8b-fa08-4f79-9367-65d32f7cb91e", | |
"title": "4k.js", | |
"content": "exports.zuckbotconfig = {\n name: '4k',\n version: '2.3.1.2',\n author: \"Nguyễn Thanh Tuấn\",\n role: 0,\n aliases:[\"netanh\",\" lamnet\"],\n info: 'Tăng chất lượng ảnh',\n Category: 'Tiện ích',\n cd: 3,\n shadowPrefix: false\n };\n let eta = 3;\n exports.onRun = async o => {\n let send = msg => o.api.sendMessage(msg, o.event.threadID, o.event.messageID);\n \n if (o.event.type != 'message_reply') return send(`⚠️ Hãy phản hồi hình ảnh nào đó!`);\n send(`🔄 Tiến hành tăng độ phân giải cho ${o.event.messageReply.attachments.length} ảnh, ước tính ${o.event.messageReply.attachments.length * eta}s`);\n \n let stream = [];\n let exec_time = 0;\n for (let i of o.event.messageReply.attachments) try {\n let res = await require('axios').get(encodeURI(`https://thanhtuan.click/upscale?url=${i.url}`), {\n responseType: 'stream',\n });\n \n exec_time += +res.headers.exec_time;\n eta = res.headers.exec_time / 1000 << 0;\n res.data.path = 'tmp.png';\n stream.push(res.data);\n } catch (e) { };\n \n send({\n body: `✅ Tăng độ phân giải hoàn tất\\nThời gian thực thi ${exec_time / 1000 << 0}s`,\n attachment: stream,\n });\n };", | |
"language": "javascript", | |
"createdAt": 1756717042977, | |
"updatedAt": 1756717042977 | |
} |