Created
June 16, 2025 18:02
-
-
Save dipto-008/97b4cc5c8c8424466f388afcdef88923 to your computer and use it in GitHub Desktop.
Hey noob ππ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require("axios"); | |
module.exports = { | |
config: { | |
name: "4k", | |
aliases: ["upscale"], | |
version: "1.1", | |
role: 0, | |
author: "Fahim_Noob", | |
countDown: 5, | |
longDescription: "Upscale images to 4K resolution.", | |
category: "image", | |
guide: { | |
en: "${pn} reply to an image to upscale it to 4K resolution." | |
} | |
}, | |
onStart: async function ({ message, event }) { | |
if (!event.messageReply || !event.messageReply.attachments || !event.messageReply.attachments[0]) { | |
return message.reply("Please reply to an image to upscale it."); | |
} | |
const imgurl = encodeURIComponent(event.messageReply.attachments[0].url); | |
const noobs = 'xyz'; | |
const upscaleUrl = `https://smfahim.${noobs}/4k?url=${imgurl}`; | |
message.reply("πΏππ π8 π±ππππ.", async (err, info) => { | |
try { | |
const { data: { image } } = await axios.get(upscaleUrl); | |
const attachment = await global.utils.getStreamFromURL(image, "upscaled-image.png"); | |
message.reply({ | |
body: "β | π·πππ ππ π±πππ 4π ππππππππ πππ:", | |
attachment: attachment | |
}); | |
let processingMsgID = info.messageID; | |
message.unsend(processingMsgID); | |
} catch (error) { | |
console.error(error); | |
message.reply("β| There was an error upscaling your image."); | |
} | |
}); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment