Datasets:
Download code/1749450686257_index.js from TwanAPI/data1: direct link, hf CLI and curl.
- Browser
- Download file 1.2 kB
-
https://huggingface.co/datasets/TwanAPI/data1/resolve/61017abf3eb0f974569a4c94f5ca4a429a2b4821/code/1749450686257_index.js
- Command line
-
hf download hf://datasets/TwanAPI/data1@61017abf3eb0f974569a4c94f5ca4a429a2b4821/code/1749450686257_index.js
-
curl -L -o 1749450686257_index.js https://huggingface.co/datasets/TwanAPI/data1/resolve/61017abf3eb0f974569a4c94f5ca4a429a2b4821/code/1749450686257_index.js
1.2 kB
| const { spawn: s } = require("child_process"); | |
| const fs = require("fs"); | |
| const l = require("./utils/log"); | |
| const moment = require('moment-timezone'); | |
| const file = './utils/check.json'; | |
| if (!fs.existsSync(file)) fs.writeFileSync(file, JSON.stringify({})); | |
| const time = () => { | |
| const ctime = moment().tz('Asia/Ho_Chi_Minh').format('YYYY-MM-DD HH:mm:ss'); | |
| fs.writeFileSync(file, JSON.stringify({ datetime: ctime })); | |
| }; | |
| setInterval(time, 30 * 1000); | |
| const sr = () => { | |
| l('🌸 ĐANG KHỞI ĐỘNG BOT', "⟦ KÍCH HOẠT ⟧⪼ "); | |
| const c = s("node", ["--trace-warnings", "--async-stack-traces", "mirai.js"], { | |
| cwd: __dirname, | |
| stdio: "inherit", | |
| shell: true | |
| }); | |
| c.on("close", async (e) => { | |
| if (e == 1) return sr("🔄 BOT ĐANG KHỞI ĐỘNG LẠI!!!"); | |
| else if (String(e).startsWith("2")) { | |
| await new Promise((r) => setTimeout(r, parseInt(e.replace('2', '')) * 1000)); | |
| sr("🌸 BOT ĐÃ ĐƯỢC KÍCH HOẠT, VUI LÒNG CHỜ MỘT CHÚT!!!"); | |
| } | |
| }); | |
| c.on("error", (error) => l("Đã xảy ra lỗi: " + JSON.stringify(error), "[ Khởi động ]")); | |
| }; | |
| sr(); |