goat
command
owner
Owner information
0
views
0
likes
0
installs
raw source
const fs = require("fs-extra");
const request = require("request");
const path = require("path");
const os = require("os");
module.exports = {
config: {
name: "owner",
version: "3.0",
author: "ไบโข๐๐๐๐๐โฟแญ",
role: 0,
shortDescription: "Owner information",
longDescription: "Show owner information",
category: "information",
guide: "{pn}"
},
onStart: async function ({ api, event }) {
const uptime = process.uptime();
const hours = Math.floor(uptime / 3600);
const minutes = Math.floor((uptime % 3600) / 60);
const seconds = Math.floor(uptime % 60);
const totalMem = (os.totalmem() / 1024 / 1024 / 1024).toFixed(2);
const freeMem = (os.freemem() / 1024 / 1024 / 1024).toFixed(2);
const msg = `
โโโโโโโโโโโ
๐ข๐ช๐ก๐๐ฅ ๐ฃ๐ฅ๐ข๐๐๐๐
โโโโโโโโโโโ
โญโโโโโโโโโโโญ
โ๐๐ก๐ฎ๐บ๐ฒ : ไบโข๐๐๐๐๐โฟแญ
โ๐งธ๐ก๐ถ๐ฐ๐ธ : Vondo
โ๐ฎ ๐๐ด๐ฒ : 20
โ๐ค ๐ฆ๐๐ฎ๐๐๐ : Single
โโก๏ธ ๐ฃ๐ฟ๐ผ๐ณ๐ฒ๐๐๐ถ๐ผ๐ป : Student
| ๐ธ๐๐ฑ๐๐ฐ๐ฎ๐๐ถ๐ผ๐ป : Inter 2nd Year
โ๐ถ ๐๐ผ๐ฐ๐ฎ๐๐ถ๐ผ๐ป : Khulna
โฐโโโโโโโโโโโญ
โญโโโโโโโโโโญ
|๐ ${hours}h ${minutes}m ${seconds}s
|
|๐พ : ${freeMem}GB / ${totalMem}GB
โฐโโโโโโโโโโญ
โญโโโโโโโโโโโญ
โ๐ WhatsApp
โ๐ wa.me/01830981279
โฐโโโโโโโโโโโญ
`;
const cacheFolder = path.join(__dirname, "cache");
const imagePath = path.join(cacheFolder, "owner.jpg");
fs.ensureDirSync(cacheFolder);
const imageUrl = "https://i.imgur.com/g0GpgfG.jpeg";
request(imageUrl)
.pipe(fs.createWriteStream(imagePath))
.on("close", () => {
api.sendMessage(
{
body: msg,
attachment: fs.createReadStream(imagePath)
},
event.threadID,
() => {
if (fs.existsSync(imagePath))
fs.unlinkSync(imagePath);
},
event.messageID
);
})
.on("error", () => {
api.sendMessage(msg, event.threadID, event.messageID);
});
}
};