From 6d731607c21e3b2146210bc03f3bb9eaf78ce8c2 Mon Sep 17 00:00:00 2001 From: Kingjux <154667110+Kingjux@users.noreply.github.com> Date: Sun, 5 May 2024 20:42:13 +0300 Subject: [PATCH] Create index.js --- lib/index.js | 412 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 412 insertions(+) create mode 100644 lib/index.js diff --git a/lib/index.js b/lib/index.js new file mode 100644 index 00000000..a54779fc --- /dev/null +++ b/lib/index.js @@ -0,0 +1,412 @@ +const Config = require("../config"); +const fs = require("fs"); +const { + Insta, + pinterest, + adultvid, + hentai, + tlang, + botpic, + language, + getString, + wikimedia, + toAudio, + toPTT, + toVideo, + sync, + syncgit, + ffmpeg, + TelegraPh, + UploadFileUgu, + webp2mp4File, + fancy, + randomfancy, + ringtone, + styletext, + isAdmin, + isBotAdmin, + createUrl, + mediafireDl, + mediafire, + dare, + truth, + random_question, + amount_of_questions +} = require("./scraper"); +const acrcloud = require(__dirname + "/class/init"); +const { + unixTimestampSecond, + generateMessageTag, + processTime, + getBuffer, + smdBuffer, + fetchJson, + astroJson, + runtime, + clockString, + sleep, + isUrl, + getTime, + formatDate, + formatp, + jsonformat, + logic, + generateProfilePicture, + bytesToSize, + getSizeMedia, + parseMention, + GIFBufferToVideoBuffer, + smsg, + callsg +} = require("./serialized"); +const { + listall, + strikeThrough, + wingdings, + vaporwave, + typewriter, + analucia, + tildeStrikeThrough, + underline, + doubleUnderline, + slashThrough, + sparrow, + heartsBetween, + arrowBelow, + crossAboveBelow, + creepify, + bubbles, + mirror, + squares, + roundsquares, + flip, + tiny, + createMap, + serif_I, + manga, + ladybug, + runes, + serif_B, + serif_BI, + fancy1, + fancy2, + fancy3, + fancy4, + fancy5, + fancy6, + fancy7, + fancy8, + fancy9, + fancy10, + fancy11, + fancy12, + fancy13, + fancy14, + fancy15, + fancy16, + fancy17, + fancy18, + fancy19, + fancy20, + fancy21, + fancy22, + fancy23, + fancy24, + fancy25, + fancy26, + fancy27, + fancy28, + fancy29, + fancy30, + fancy31, + fancy32, + fancy33, + randomStyle +} = require("./stylish-font"); +const { + sck1 +} = require(__dirname + "/database/user"); +const { + sck +} = require(__dirname + "/database/group"); +const { + alive +} = require(__dirname + "/database/alive"); +const { + pg, + dbs, + groupdb, + userdb, + alivedb, + bot_ +} = require(__dirname + "/schemes"); +const { + cmd, + smd, + commands +} = require(__dirname + "/plugins"); +const { + sendAnimeReaction, + yt, + sendGImages, + AudioToBlackVideo, + textToLogoGenerator, + photoEditor, + updateProfilePicture, + randomeFunfacts, + getRandom, + generateSticker, + forwardMessage, + plugins, + audioEditor, + send, + react, + note, + sendWelcome, + aitts +} = require(__dirname, "./asta.js"); +module.exports = { + yt: yt, + plugins: plugins, + forwardMessage: forwardMessage, + updateProfilePicture: updateProfilePicture, + sendAnimeReaction: sendAnimeReaction, + sendGImages: sendGImages, + textToLogoGenerator: textToLogoGenerator, + photoEditor: photoEditor, + updateProfilePicture: updateProfilePicture, + randomeFunfacts: randomeFunfacts, + AudioToBlackVideo: AudioToBlackVideo, + getRandom: getRandom, + generateSticker: generateSticker, + audioEditor: audioEditor, + send: send, + react: react, + note: note, + sendWelcome: sendWelcome, + aitts: aitts, + pg: pg, + dbs: dbs, + bot_: bot_, + alive: alive, + sck: sck, + smd: smd, + commands: commands, + sck1: sck1, + Insta: Insta, + pinterest: pinterest, + adultvid: adultvid, + hentai: hentai, + tlang: tlang, + botpic: botpic, + language: language, + getString: getString, + wikimedia: wikimedia, + toAudio: toAudio, + toPTT: toPTT, + toVideo: toVideo, + sync: sync, + syncgit: syncgit, + ffmpeg: ffmpeg, + TelegraPh: TelegraPh, + UploadFileUgu: UploadFileUgu, + webp2mp4File: webp2mp4File, + fancy: fancy, + randomfancy: randomfancy, + ringtone: ringtone, + styletext: styletext, + isAdmin: isAdmin, + isBotAdmin: isBotAdmin, + createUrl: createUrl, + mediafireDl: mediafireDl, + mediafire: mediafire, + dare: dare, + truth: truth, + random_question: random_question, + amount_of_questions: amount_of_questions, + unixTimestampSecond: unixTimestampSecond, + generateMessageTag: generateMessageTag, + processTime: processTime, + getBuffer: getBuffer, + smdBuffer: smdBuffer, + fetchJson: fetchJson, + astroJson: astroJson, + runtime: runtime, + clockString: clockString, + sleep: sleep, + isUrl: isUrl, + getTime: getTime, + formatDate: formatDate, + formatp: formatp, + jsonformat: jsonformat, + logic: logic, + generateProfilePicture: generateProfilePicture, + bytesToSize: bytesToSize, + getSizeMedia: getSizeMedia, + parseMention: parseMention, + GIFBufferToVideoBuffer: GIFBufferToVideoBuffer, + smsg: smsg, + callsg: callsg, + pinterest: pinterest, + tlang: tlang, + botpic: botpic, + language: language, + getString: getString, + wikimedia: wikimedia, + toAudio: toAudio, + toPTT: toPTT, + toVideo: toVideo, + sync: sync, + syncgit: syncgit, + ffmpeg: ffmpeg, + TelegraPh: TelegraPh, + UploadFileUgu: UploadFileUgu, + webp2mp4File: webp2mp4File, + fancy: fancy, + randomfancy: randomfancy, + listall: listall, + strikeThrough: strikeThrough, + wingdings: wingdings, + vaporwave: vaporwave, + typewriter: typewriter, + analucia: analucia, + tildeStrikeThrough: tildeStrikeThrough, + underline: underline, + doubleUnderline: doubleUnderline, + slashThrough: slashThrough, + sparrow: sparrow, + heartsBetween: heartsBetween, + arrowBelow: arrowBelow, + crossAboveBelow: crossAboveBelow, + creepify: creepify, + bubbles: bubbles, + mirror: mirror, + squares: squares, + roundsquares: roundsquares, + flip: flip, + tiny: tiny, + createMap: createMap, + serif_I: serif_I, + manga: manga, + ladybug: ladybug, + runes: runes, + serif_B: serif_B, + serif_BI: serif_BI, + serif_I: serif_I, + fancy1: fancy1, + fancy2: fancy2, + fancy3: fancy3, + fancy4: fancy4, + fancy5: fancy5, + fancy6: fancy6, + fancy7: fancy7, + fancy8: fancy8, + fancy9: fancy9, + fancy10: fancy10, + fancy11: fancy11, + fancy12: fancy12, + fancy13: fancy13, + fancy14: fancy14, + fancy15: fancy15, + fancy16: fancy16, + fancy17: fancy17, + fancy18: fancy18, + fancy19: fancy19, + fancy20: fancy20, + fancy21: fancy21, + fancy22: fancy22, + fancy23: fancy23, + fancy24: fancy24, + fancy25: fancy25, + fancy26: fancy26, + fancy27: fancy27, + fancy28: fancy28, + fancy29: fancy29, + fancy30: fancy30, + fancy31: fancy31, + fancy32: fancy32, + fancy33: fancy33, + randomStyle: randomStyle, + Insta: Insta, + addCommand: cmd, + groupdb: groupdb, + userdb: userdb, + alivedb: alivedb, + prefix: Config.HANDLERS.includes("null") ? "" : Config.HANDLERS[0], + Config: Config, + setting: Config, + stor: async () => { + return await JSON.parse(fs.readFileSync(__dirname + "/store.json", "utf8")); + }, + fancytext: (_0x886db4, _0x52dd8f) => { + _0x52dd8f = _0x52dd8f - 1; + return listall(_0x886db4)[_0x52dd8f]; + }, + parsedJid: (text = "") => { + return text.match(/[0-9]+(-[0-9]+|)(@g.us|@s.whatsapp.net)/g) || []; + }, + getAdmin: async (_0x5a768e, _0x59ffdf) => { + var _0x874421 = await _0x5a768e.groupMetadata(_0x59ffdf.chat); + a = []; + for (let _0x584ff9 of _0x874421.participants) { + if (_0x584ff9.admin == null) { + continue; + } + a.push(_0x584ff9.id); + } + return a; + }, + isGroup: isGroup = _0x2771b5 => { + return _0x2771b5.endsWith("@g.us"); + }, + parseurl: parseurl = _0x19ae82 => { + return _0x19ae82.match(new RegExp(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)/, "gi")); + }, + isInstaUrl: _0x45994a => { + /(?:(?:http|https):\/\/)?(?:www.)?(?:instagram.com|instagr.am|instagr.com)\/(\w+)/gim.test(_0x45994a); + }, + isNumber: function isNumber() { + const _0x525956 = parseInt(this); + return typeof _0x525956 === "number" && !isNaN(_0x525956); + }, + shazam: async function shazam(_0x859a32) { + let _0x49c991 = new acrcloud({ + host: "identify-eu-west-1.acrcloud.com", + endpoint: "/v1/identify", + signature_version: "1", + data_type: "audio", + secure: true, + access_key: "c816ad50a2bd6282e07b90447d93c38c", + access_secret: "ZpYSwmCFpRovcSQBCFCe1KArX7xt8DTkYx2XKiIP" + }); + let _0xf13a35 = await _0x49c991.identify(_0x859a32); + let { + code: _0x415c0c, + msg: _0x256320 + } = _0xf13a35.status; + if (_0x415c0c !== 0) { + return _0x256320; + } + let { + title: _0x341b8a, + artists: _0x4ac72a, + album: _0x4a0f93, + genres: _0x27dc36, + release_date: _0x190efe, + external_metadata: _0x43a980 + } = _0xf13a35.metadata.music[0]; + let { + youtube: _0x5a3838, + spotify: _0x493522 + } = _0x43a980; + return { + status: 200, + title: _0x341b8a, + artists: _0x4ac72a !== undefined ? _0x4ac72a.map(_0x428f09 => _0x428f09.name).join(", ") : "", + genres: _0x27dc36 !== undefined ? _0x27dc36.map(_0x20c5cf => _0x20c5cf.name).join(", ") : "", + release_date: _0x190efe, + album: _0x4a0f93.name || "", + data: _0xf13a35 + }; + } +};