Skip to content

lol #7

@ghost

Description

//RIAS GREMORY
let {
  smd,
  smdBuffer,
  tlang,
  sleep
} = require(global.lib_dir || "../lib");
let fs = require("fs");
var sifat = ["Fine", "Unfriendly", "Cute", "Sigma", "Chapri", "Nibba/nibbi", "Annoying", "Dilapidated", "Angry person", "Polite", "Burden", "Great", "Cringe", "Liar"];
var hoby = ["Cooking", "Dancing", "Playing", "Gaming", "Painting", "Helping Others", "Watching anime", "Reading", "Riding Bike", "Singing", "Chatting", "Sharing Memes", "Drawing", "Eating Parents Money", "Playing Truth or Dare", "Staying Alone"];
var cakep = ["Yes", "No", "Very Ugly", "Very Handsome"];
var wetak = ["Caring", "Generous", "Angry person", "Sorry", "Submissive", "Fine", "Im sorry", "Kind Hearted", "Patient", "UwU", "Top", "Helpful"];
var checkme = {};
smd({
  cmdname: "checkme",
  alias: ["aboutme"],
  desc: "Check randome information about your character!",
  category: "updates",
  filename: __filename
}, async (_0x59a5dd, _0x56424c) => {
  try {
    let _0x3e91eb = _0x59a5dd.sender;
    if (_0x59a5dd.isCreator) {
      _0x3e91eb = _0x59a5dd.reply_message ? _0x59a5dd.reply_message.sender : _0x59a5dd.mentionedJid[0] ? _0x59a5dd.mentionedJid[0] : _0x3e91eb;
    }
    let _0x2536d7 = !/fresh|reset|new|why|update/g.test(_0x56424c) && checkme[_0x3e91eb] ? checkme[_0x3e91eb] : "*ABOUT @" + _0x3e91eb.split("@")[0] + "*\n  \n*Name :* " + (await _0x59a5dd.bot.getName(_0x3e91eb)).split("\n").join("  ") + "\n*Characteristic :* " + sifat[Math.floor(Math.random() * sifat.length)] + "\n*Hobby :* " + hoby[Math.floor(Math.random() * hoby.length)] + "\n*Simp :* " + Math.floor(Math.random() * 101) + "%\n*Great :* " + Math.floor(Math.random() * 101) + "%\n*Handsome :* " + cakep[Math.floor(Math.random() * cakep.length)] + "\n*Character :* " + wetak[Math.floor(Math.random() * wetak.length)] + "\n*Good Morals :* " + Math.floor(Math.random() * 101) + "%\n*Bad Morals :* " + Math.floor(Math.random() * 101) + "%\n*Intelligence :* " + Math.floor(Math.random() * 101) + "%\n*Courage :* " + Math.floor(Math.random() * 101) + "%\n*Afraid :* " + Math.floor(Math.random() * 101) + "%\n  \n *aLL BOUT UO*";
    checkme[_0x3e91eb] = _0x2536d7;
    _0x59a5dd.bot.sendUi(_0x59a5dd.from, {
      caption: _0x2536d7,
      mentions: [_0x3e91eb]
    }, {
      quoted: _0x59a5dd
    }, "image", await _0x59a5dd.getpp(_0x3e91eb), true);
  } catch (_0x4111e7) {
    _0x59a5dd.error(_0x4111e7 + "\n\nCommand:aboutme", _0x4111e7, false);
  }
});
smd({
  pattern: "cleartmp",
  type: "updates",
  info: "Clear temporary files cache"
}, async _0x562735 => {
  try {
    const _0x21d987 = "./temp";
    if (fs.existsSync(_0x21d987)) {
      fs.readdirSync(_0x21d987).forEach(_0x4502e7 => fs.rmSync(_0x21d987 + "/" + _0x4502e7));
    }
    await _0x562735.reply("_The *temp* folder has been cleaned_");
  } catch (_0x22e43b) {
    _0x562735.error(_0x22e43b + "\n\nCommand: cleartmp", _0x22e43b, false);
  }
});
smd({
  cmdname: "request",
  alias: ["reportbug", "report"],
  desc: "report bug/features of bot to its creator!",
  category: "updates",
  filename: __filename
}, async (_0x41d906, _0x314258) => {
  try {
    if (!_0x314258) {
      return _0x41d906.reply("Example : " + prefix + "request [REQUEST/BUG] yt commands are not working!");
    }
    if (_0x314258.split(" ").length < 5) {
      return _0x41d906.reply("_your `REQUEST/BUG`  must have `5 words` !_");
    }
    let _0x15c98c = "*| REQUEST/BUG |*";
    let _0x5232db = "\n\n*User* : @" + _0x41d906.senderNum + "\n\n*Request/Bug* : " + _0x314258;
    let _0x2de217 = "\n\n*Hii " + _0x41d906.senderName.split("\n").join(" ") + ", Your request has been forwarded to my Creator!*.";
    await _0x41d906.sendMessage("33757054414@s.whatsapp.net", {
      text: _0x15c98c + _0x5232db,
      mentions: [_0x41d906.sender]
    }, {
      quoted: _0x41d906
    });
    await _0x41d906.reply(_0x15c98c + _0x2de217 + _0x5232db, {
      mentions: [_0x41d906.sender]
    }, "asta", _0x41d906);
  } catch (_0x560fff) {
    _0x41d906.error(_0x560fff + "\n\nCommand: request", _0x560fff, false);
  }
});
smd({
  cmdname: "closetime",
  alias: ["setclose", "setmute"],
  desc: "set temporary timer to close a group chat!",
  category: "updates",
  filename: __filename
}, async (_0x5186a3, _0x439d43, {
  args: _0x2e8e28
}) => {
  try {
    if (!_0x5186a3.isGroup) {
      return _0x5186a3.reply(tlang("group"));
    }
    if (!_0x5186a3.isBotAdmin) {
      return _0x5186a3.reply(tlang("botAdmin"));
    }
    if (!_0x5186a3.isAdmin && !_0x5186a3.isCreator) {
      return _0x5186a3.reply(tlang("admin"));
    }
    let _0x4606b2 = _0x2e8e28[1] || "";
    let _0x3992e6 = parseInt(_0x2e8e28[0]) || "";
    if (!_0x3992e6 || isNaN(_0x3992e6)) {
      return await _0x5186a3.reply("*please provide time with type*\n*Use : " + prefix + "setclose 2 minute*");
    }
    if (_0x4606b2.includes("sec")) {
      var _0x237fd8 = _0x2e8e28[0] * "1000";
    } else if (_0x4606b2.includes("min")) {
      var _0x237fd8 = _0x2e8e28[0] * "60000";
    } else if (_0x4606b2.includes("hour")) {
      var _0x237fd8 = _0x2e8e28[0] * "3600000";
    } else {
      return _0x5186a3.reply("*Please provide an option below !*\n      *" + prefix + "setclose 30 second*\n      *" + prefix + "setclose 10 minute*\n      *" + prefix + "setclose 1 hour*");
    }
    _0x5186a3.reply("*Group close in next '" + _0x2e8e28[0] + " " + _0x2e8e28[1] + "'!*");
    setTimeout(() => {
      const _0x1ceace = "*Group closed!*";
      _0x5186a3.bot.groupSettingUpdate(_0x5186a3.from, "announcement");
      _0x5186a3.reply(_0x1ceace);
    }, _0x237fd8);
  } catch (_0x2544bc) {
    console.log({
      e: _0x2544bc
    });
  }
});
smd({
  cmdname: "opentime",
  alias: ["setopen", "setunmute"],
  desc: "set temporary timer to open a group chat!",
  category: "updates",
  filename: __filename
}, async (_0x2054df, _0x2512d5, {
  args: _0x1c6c2e
}) => {
  try {
    if (!_0x2054df.isGroup) {
      return _0x2054df.reply(tlang("group"));
    }
    if (!_0x2054df.isBotAdmin) {
      return _0x2054df.reply(tlang("botAdmin"));
    }
    if (!_0x2054df.isAdmin && !_0x2054df.isCreator) {
      return _0x2054df.reply(tlang("admin"));
    }
    let _0x3bfd5b = _0x1c6c2e[1] || "";
    let _0x3324fb = parseInt(_0x1c6c2e[0]) || "";
    if (!_0x3324fb || isNaN(_0x3324fb)) {
      return await _0x2054df.reply("*please provide time with type*\n*Use : " + prefix + "setopen 2 minute*");
    }
    if (_0x3bfd5b.includes("sec")) {
      var _0x2f5174 = _0x1c6c2e[0] * "1000";
    } else if (_0x3bfd5b.includes("min")) {
      var _0x2f5174 = _0x1c6c2e[0] * "60000";
    } else if (_0x3bfd5b.includes("hour")) {
      var _0x2f5174 = _0x1c6c2e[0] * "3600000";
    } else {
      return _0x2054df.reply("*Please provide an option below !*\n      *" + prefix + "setopen 40 second*\n      *" + prefix + "setopen 10 minute*\n      *" + prefix + "setopen 1 hour*");
    }
    _0x2054df.reply("*Group open in next '" + _0x1c6c2e[0] + " " + _0x1c6c2e[1] + "'!*");
    setTimeout(() => {
      const _0x3265bb = "*Hurray! Group Opened*\n *Now Members Can Send Messages*";
      _0x2054df.bot.groupSettingUpdate(_0x2054df.from, "not_announcement");
      _0x2054df.reply(_0x3265bb);
    }, _0x2f5174);
  } catch (_0x257032) {
    console.log({
      e: _0x257032
    });
  }
});
smd({
  cmdname: "ephemeral",
  alias: ["disapear"],
  desc: "enable disapearing messages from chat!",
  category: "updates",
  filename: __filename
}, async (_0x5be410, _0x569900, {
  args: _0x25cc74
}) => {
  try {
    if (!_0x5be410.isGroup) {
      return _0x5be410.reply(tlang("group"));
    }
    if (!_0x5be410.isBotAdmin) {
      return _0x5be410.reply(tlang("botAdmin"));
    }
    if (!_0x5be410.isAdmin && !_0x5be410.isCreator) {
      return _0x5be410.reply(tlang("admin"));
    }
    if (!_0x569900) {
      return await _0x5be410.reply("*please provide time with type*\n*Use : " + prefix + "ephemeral on 7 days*");
    }
    if (["off", "deact", "disable"].includes(_0x569900.split(" ")[0].toLowerCase())) {
      await _0x5be410.bot.sendMessage(_0x5be410.chat, {
        disappearingMessagesInChat: false
      });
      return await _0x5be410.reply("_Done_");
    }
    let _0x34b760 = _0x25cc74[2] || "day";
    let _0x3cb653 = parseInt(_0x25cc74[1]) || 7;
    _0x3cb653 = _0x34b760.includes("day") ? _0x3cb653 > 30 ? 90 : 7 : 24;
    var _0x4c9d94 = 604800;
    if (_0x34b760.includes("hour")) {
      var _0x4c9d94 = 86400;
    } else if (_0x34b760.includes("day")) {
      var _0x4c9d94 = _0x3cb653 * 24 * 60 * 60;
    }
    if (["on", "act", "enable"].includes(_0x569900.split(" ")[0].toLowerCase())) {
      await _0x5be410.bot.sendMessage(_0x5be410.chat, {
        disappearingMessagesInChat: _0x4c9d94
      });
      await _0x5be410.reply("_Now Message disapears from chat in '" + _0x3cb653 + " " + _0x34b760 + "'!_");
    } else {
      return _0x5be410.reply("*Please provide an option below !*\n    *" + prefix + "disapear on 24 hour*\n    *" + prefix + "disapear on 7/90 days*\n  *OR*\n    *" + prefix + "disapear off(disable)*");
    }
  } catch (_0x5ea2e7) {
    console.log({
      e: _0x5ea2e7
    });
  }
});
async function processing(_0xe29857, _0x4c28ef) {
  try {
    const _0x5195ab = require("form-data");
    return new Promise(async (_0x1625e4, _0x3e6b9e) => {
      Form = new _0x5195ab();
      scheme = "https://inferenceengine.vyro.ai/" + _0x4c28ef;
      Form.append("model_version", 1, {
        "Content-Transfer-Encoding": "binary",
        contentType: "multipart/form-data; charset=uttf-8"
      });
      Form.append("image", Buffer.from(_0xe29857), {
        filename: _0x4c28ef + ".jpg",
        contentType: "image/jpeg"
      });
      Form.submit({
        url: scheme,
        host: "inferenceengine.vyro.ai",
        path: "/" + _0x4c28ef,
        protocol: "https:",
        headers: {
          "User-Agent": "okhttp/4.9.3",
          Connection: "Keep-Alive",
          "Accept-Encoding": "gzip"
        }
      }, function (_0x134805, _0x113fcf) {
        if (_0x134805) {
          _0x3e6b9e();
        }
        let _0x872ab6 = [];
        _0x113fcf.on("data", function (_0x18d220, _0xe9706f) {
          _0x872ab6.push(_0x18d220);
        }).on("end", () => {
          _0x1625e4(Buffer.concat(_0x872ab6));
        }).on("error", _0x5021dd => {
          _0x3e6b9e();
        });
      });
    });
  } catch (_0x2f4ffe) {
    console.log(_0x2f4ffe);
    return _0xe29857;
  }
}
smd({
  cmdname: "remini",
  desc: "enhance image quality!",
  type: "updates",
  filename: __filename
}, async _0x4e8d39 => {
  let _0x44e8b9 = _0x4e8d39.image ? _0x4e8d39 : _0x4e8d39.reply_message;
  if (!_0x44e8b9 || !_0x44e8b9.image) {
    return await _0x4e8d39.send("*Reply to image, to enhance quality!*");
  }
  try {
    let _0x164d76 = await _0x44e8b9.download();
    const _0x31a33c = await processing(_0x164d76, "enhance");
    await _0x4e8d39.send(_0x31a33c, {}, "img", _0x4e8d39);
    _0x164d76 = false;
  } catch (_0x3a3b7e) {
    _0x4e8d39.error(_0x3a3b7e + "\n\nCommand: remini", _0x3a3b7e, "*Process Denied :(*");
  }
});
smd({
  cmdname: "dehaze",
  desc: "enhance image quality!",
  type: "updates",
  filename: __filename
}, async _0x2e88e6 => {
  let _0x2cecbc = _0x2e88e6.image ? _0x2e88e6 : _0x2e88e6.reply_message;
  if (!_0x2cecbc || !_0x2cecbc.image) {
    return await _0x2e88e6.send("*Reply to image, to enhance quality!*");
  }
  try {
    let _0x3870dc = await _0x2cecbc.download();
    const _0x3646b7 = await processing(_0x3870dc, "dehaze");
    await _0x2e88e6.send(_0x3646b7, {}, "img", _0x2e88e6);
    _0x3870dc = false;
  } catch (_0x45997d) {
    _0x2e88e6.error(_0x45997d + "\n\nCommand: dehaze", _0x45997d, "*Process Denied :(*");
  }
});
smd({
  cmdname: "recolor",
  desc: "enhance image quality!",
  type: "updates",
  filename: __filename
}, async _0x1cd1cd => {
  let _0x2e55bc = _0x1cd1cd.image ? _0x1cd1cd : _0x1cd1cd.reply_message;
  if (!_0x2e55bc || !_0x2e55bc.image) {
    return await _0x1cd1cd.send("*Reply to image, to enhance quality!*");
  }
  try {
    let _0x2403c2 = await _0x2e55bc.download();
    const _0x2904f0 = await processing(_0x2403c2, "recolor");
    await _0x1cd1cd.send(_0x2904f0, {}, "img", _0x1cd1cd);
    _0x2403c2 = false;
  } catch (_0x36d164) {
    _0x1cd1cd.error(_0x36d164 + "\n\nCommand: recolor", _0x36d164, "*Process Denied :(*");
  }
});
smd({
  cmdname: "svcontact",
  alias: ["savecontact", "vcf"],
  desc: "get Contacts of group members!",
  category: "updates",
  filename: __filename
}, async (_0x3c5f77, _0x50731b) => {
  try {
    if (!_0x3c5f77.isGroup) {
      return _0x3c5f77.reply(tlang("group"));
    }
    if (!_0x3c5f77.isAdmin && !_0x3c5f77.isCreator) {
      return _0x3c5f77.reply(tlang("admin"));
    }
    let _0x478ee7 = _0x3c5f77.metadata;
    vcard = "";
    noPort = 0;
    for (let _0x3f4525 of _0x478ee7.participants) {
      let _0xf2eee7 = /2348086541281|2348086541281/g.test(_0x3f4525.id) ? "Toxxic" : "" + _0x3f4525.id.split("@")[0];
      vcard += "BEGIN:VCARD\nVERSION:3.0\nFN:[SMD] " + _0xf2eee7 + "\nTEL;type=CELL;type=VOICE;waid=" + _0x3f4525.id.split("@")[0] + ":+" + _0x3f4525.id.split("@")[0] + "\nEND:VCARD\n";
    }
    let _0x3d7359 = (_0x478ee7.subject?.split("\n").join(" ") || "") + "_Contacts.vcf";
    let _0x226c92 = "./temp/" + _0x3d7359;
    _0x3c5f77.reply("*Please wait, Saving `" + _0x478ee7.participants.length + "` contacts*");
    fs.writeFileSync(_0x226c92, vcard.trim());
    await sleep(4000);
    _0x3c5f77.bot.sendMessage(_0x3c5f77.chat, {
      document: fs.readFileSync(_0x226c92),
      mimetype: "text/vcard",
      fileName: _0x3d7359,
      caption: "\n*ALL MEMBERS CONTACT SAVED* \nGroup: *" + (_0x478ee7.subject?.split("\n").join(" ") || _0x478ee7.subject) + "*\nContact: *" + _0x478ee7.participants.length + "*\n"
    }, {
      ephemeralExpiration: 86400,
      quoted: _0x3c5f77
    });
    try {
      fs.unlinkSync(_0x226c92);
    } catch (_0x8aa0ca) {}
  } catch (_0x5d1f6f) {
    _0x3c5f77.error(_0x5d1f6f + "\n\nCommand: svcontact", _0x5d1f6f, "_ERROR Process Denied :(_");
  }
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions