This commit is contained in:
Hri7566 2022-07-27 09:53:04 +02:00
parent 9e84167394
commit 86b3e24e21
15 changed files with 118 additions and 47 deletions

Binary file not shown.

Binary file not shown.

BIN
bot2022.db/008691.log Normal file

Binary file not shown.

BIN
bot2022.db/008692.ldb Normal file

Binary file not shown.

View File

@ -1 +1 @@
MANIFEST-002970
MANIFEST-008690

View File

@ -1,11 +1,9 @@
2022/07/08-02:23:44.101244 7f4febfff700 Recovering log #2967
2022/07/08-02:23:44.107787 7f4febfff700 Level-0 table #2971: started
2022/07/08-02:23:44.115393 7f4febfff700 Level-0 table #2971: 49620 bytes OK
2022/07/08-02:23:44.126540 7f4febfff700 Delete type=0 #2967
2022/07/08-02:23:44.127313 7f4febfff700 Delete type=3 #2960
2022/07/08-02:28:22.291507 7f4feb77c700 Compacting 1@0 + 1@1 files
2022/07/08-02:28:22.306414 7f4feb77c700 Generated table #2973@0: 10817 keys, 530507 bytes
2022/07/08-02:28:22.306443 7f4feb77c700 Compacted 1@0 + 1@1 files => 530507 bytes
2022/07/08-02:28:22.308436 7f4feb77c700 compacted to: files[ 0 1 0 0 0 0 0 ]
2022/07/08-02:28:22.308631 7f4feb77c700 Delete type=2 #2969
2022/07/08-02:28:22.308807 7f4feb77c700 Delete type=2 #2971
2022/07/27-09:49:57.946742 7f522ffff700 Recovering log #8689
2022/07/27-09:49:57.951888 7f522ffff700 Delete type=3 #8688
2022/07/27-09:49:57.951935 7f522ffff700 Delete type=0 #8689
2022/07/27-09:52:58.078223 7f522dc68700 Compacting 1@0 + 1@1 files
2022/07/27-09:52:58.148573 7f522dc68700 Generated table #8692@0: 11807 keys, 585413 bytes
2022/07/27-09:52:58.148625 7f522dc68700 Compacted 1@0 + 1@1 files => 585413 bytes
2022/07/27-09:52:58.150219 7f522dc68700 compacted to: files[ 0 1 0 0 0 0 0 ]
2022/07/27-09:52:58.151088 7f522dc68700 Delete type=2 #8564
2022/07/27-09:52:58.151537 7f522dc68700 Delete type=2 #8566

View File

@ -1,29 +1,3 @@
2022/07/05-08:15:14.787673 7ff18a7fc700 Recovering log #2958
2022/07/05-08:15:14.825381 7ff18a7fc700 Level-0 table #2961: started
2022/07/05-08:15:14.846109 7ff18a7fc700 Level-0 table #2961: 218251 bytes OK
2022/07/05-08:15:14.851498 7ff18a7fc700 Delete type=3 #2956
2022/07/05-08:15:14.851538 7ff18a7fc700 Delete type=0 #2958
2022/07/05-08:19:38.925992 7ff16bfff700 Compacting 1@0 + 1@1 files
2022/07/05-08:19:38.958589 7ff16bfff700 Generated table #2963@0: 10606 keys, 519653 bytes
2022/07/05-08:19:38.958618 7ff16bfff700 Compacted 1@0 + 1@1 files => 519653 bytes
2022/07/05-08:19:38.960021 7ff16bfff700 compacted to: files[ 0 1 0 0 0 0 0 ]
2022/07/05-08:19:38.962113 7ff16bfff700 Delete type=2 #2961
2022/07/05-08:19:38.962375 7ff16bfff700 Delete type=2 #2959
2022/07/06-14:28:39.689047 7ff16bfff700 Level-0 table #2965: started
2022/07/06-14:28:39.759957 7ff16bfff700 Level-0 table #2965: 472777 bytes OK
2022/07/06-14:28:39.764050 7ff16bfff700 Delete type=0 #2962
2022/07/06-14:33:39.696459 7ff16bfff700 Compacting 1@0 + 1@1 files
2022/07/06-14:33:39.737381 7ff16bfff700 Generated table #2966@0: 10709 keys, 521000 bytes
2022/07/06-14:33:39.737399 7ff16bfff700 Compacted 1@0 + 1@1 files => 521000 bytes
2022/07/06-14:33:39.738183 7ff16bfff700 compacted to: files[ 0 1 0 0 0 0 0 ]
2022/07/06-14:33:39.738326 7ff16bfff700 Delete type=2 #2965
2022/07/06-14:33:39.738467 7ff16bfff700 Delete type=2 #2963
2022/07/07-22:53:11.772316 7ff16bfff700 Level-0 table #2968: started
2022/07/07-22:53:11.810371 7ff16bfff700 Level-0 table #2968: 461977 bytes OK
2022/07/07-22:53:11.815836 7ff16bfff700 Delete type=0 #2964
2022/07/07-22:58:13.583522 7ff16bfff700 Compacting 1@0 + 1@1 files
2022/07/07-22:58:13.611342 7ff16bfff700 Generated table #2969@0: 10811 keys, 529525 bytes
2022/07/07-22:58:13.611367 7ff16bfff700 Compacted 1@0 + 1@1 files => 529525 bytes
2022/07/07-22:58:13.612600 7ff16bfff700 compacted to: files[ 0 1 0 0 0 0 0 ]
2022/07/07-22:58:13.612810 7ff16bfff700 Delete type=2 #2966
2022/07/07-22:58:13.613315 7ff16bfff700 Delete type=2 #2968
2022/07/27-09:49:57.117157 7fb0817fa700 Recovering log #8687
2022/07/27-09:49:57.120646 7fb0817fa700 Delete type=0 #8687
2022/07/27-09:49:57.120686 7fb0817fa700 Delete type=3 #8686

Binary file not shown.

BIN
bot2022.db/MANIFEST-008690 Normal file

Binary file not shown.

24
crown.js Normal file
View File

@ -0,0 +1,24 @@
require("dotenv").config();
let token = process.env.MPPCLONE_TOKEN;
const Client = require("mppclone-client");
let cl = new Client("wss://mppclone.com:8443", token);
let trusted_ids = [
"244ea3e6d8750618fa53fbd5",
"ead940199c7d9717e5149919"
];
cl.on("a", msg => {
if (trusted_ids.indexOf(msg.p._id) == -1) return;
if (msg.a == "!chown" || msg.a == "!crown") {
cl.sendArray([{m: "chown", id: msg.p.id}]);
cl.sendArray([{m: 'a', message: "Giving crown to " + msg.p.name + "."}]);
}
});
cl.start();
cl.setChannel("To our dear Lmof, we love you so much.");

47
package-lock.json generated
View File

@ -11,7 +11,8 @@
"dependencies": {
"discord.js": "^12.5.3",
"dotenv": "^9.0.1",
"level": "^6.0.1"
"level": "^6.0.1",
"mppclone-client": "^1.0.0"
}
},
"node_modules/@discordjs/collection": {
@ -325,6 +326,34 @@
"node": ">= 0.6"
}
},
"node_modules/mppclone-client": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/mppclone-client/-/mppclone-client-1.0.0.tgz",
"integrity": "sha512-yZUr4POT8MqlhqwvsYCnwVxnCXSlLGLcSUeLtiiJtE3BsDZOpM4VZ27k32ATC2mZs8M0tNLE7KkDd1j+sTvGSw==",
"dependencies": {
"ws": "^8.5.0"
}
},
"node_modules/mppclone-client/node_modules/ws": {
"version": "8.8.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz",
"integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==",
"engines": {
"node": ">=10.0.0"
},
"peerDependencies": {
"bufferutil": "^4.0.1",
"utf-8-validate": "^5.0.2"
},
"peerDependenciesMeta": {
"bufferutil": {
"optional": true
},
"utf-8-validate": {
"optional": true
}
}
},
"node_modules/napi-macros": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz",
@ -661,6 +690,22 @@
"mime-db": "1.47.0"
}
},
"mppclone-client": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/mppclone-client/-/mppclone-client-1.0.0.tgz",
"integrity": "sha512-yZUr4POT8MqlhqwvsYCnwVxnCXSlLGLcSUeLtiiJtE3BsDZOpM4VZ27k32ATC2mZs8M0tNLE7KkDd1j+sTvGSw==",
"requires": {
"ws": "^8.5.0"
},
"dependencies": {
"ws": {
"version": "8.8.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz",
"integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==",
"requires": {}
}
}
},
"napi-macros": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz",

View File

@ -20,6 +20,7 @@
"dependencies": {
"discord.js": "^12.5.3",
"dotenv": "^9.0.1",
"level": "^6.0.1"
"level": "^6.0.1",
"mppclone-client": "^1.0.0"
}
}

View File

@ -275,7 +275,7 @@ module.exports = class Bot extends StaticEventEmitter {
}
static getRank(id) {
if (this.admin.indexOf(id) !== -1) {
if (this.admin.indexOf(id) !== -1 || MPPClient.client.getOwnParticipant()._id == id) {
return "admin";
} else {
return "none";

View File

@ -7,7 +7,9 @@ module.exports = class MPPClient {
// this.client = new Client('wss://mpp.hri7566.info:8443');
this.client.start();
// this.client.setChannel('✧𝓓𝓔𝓥 𝓡𝓸𝓸𝓶✧');
this.client.setChannel('test/fishing');
// this.client.setChannel('test/fishing');
// this.client.setChannel("To our dear Lmof, we love you so much.");
this.client.setChannel("✧𝓓𝓔𝓥 𝓡𝓸𝓸𝓶✧");
this.bindEventListeners();
}

31
test.js
View File

@ -26,7 +26,12 @@ client.setChannel("test/fishing");
// let _id = "b40df99cc2ca6f503fba77cb"; // bouncer
// let _id = "4d354eaddf02eedc6211034c"; // theta
// let _id = "50b0903e19cda807c526d95b"; // sola
let _id = "69bb36e9a48bcc5658b5723b"; // wolfy corn bot
// let _id = "69bb36e9a48bcc5658b5723b"; // wolfy corn bot
// let _id = "0e04e7035d15173d6554df55"; // owl
// let _id = "61251f3e8c5f5990e2f8f743";
// let _id = "c9b24baebcf6a664432c90d2"; // stingray bob
// let _id = "1a43d20ac604a25470d18669";
let _id = "ceb7254d23ba4ba5a925f7a9";
function rrggbbrand(){var a = Math.floor(Math.random() * 256).toString(16); return a.length < 2 ? "0"+a : a};
function hslToHex(h, s, l) {
@ -40,6 +45,20 @@ function hslToHex(h, s, l) {
return `#${f(0)}${f(8)}${f(4)}`;
}
function spoop_text(message) {
var old = message;
message = "";
for(var i = 0; i < old.length; i++) {
if(Math.random() < 0.9) {
message+=String.fromCharCode(old.charCodeAt(i)+Math.floor(Math.random() * 20 - 10));
//message[i] = String.fromCharCode(Math.floor(Math.random() * 255));
} else {
message+=old[i];
}
}
return message;
}
client.on("ch", () => {
// let color = `#${rrggbbrand()}${rrggbbrand()}${rrggbbrand()}`;
// console.log(color);
@ -69,6 +88,12 @@ client.on("ch", () => {
}, 1000 / 2);
*/
setInterval(() => {
client.sendArray([{m: "setname", _id: _id, name: "mean user"}]);
}, 500);
// client.sendArray([{m:"setname", _id:_id, name:"낚시 앱 [/help]"}]);
// client.sendArray([{m: "setname", _id: _id, name: "kake fartz owo"}])
// client.sendArray([{m: "setname", _id: _id, name: "๖ۣۜH͜r̬i͡7566's NMPB"}])
@ -78,7 +103,9 @@ client.on("ch", () => {
// client.sendArray([{m: "setcolor", _id: _id, color: "#8d3f50"}]);
// client.sendArray([{m: "setname", _id: _id, name: "🎅 a bot [=help] ❄️"}]);
// client.sendArray([{m: "setname", _id: _id, name: "sola"}]);
client.sendArray([{m: "setcolor", _id: "_id", color: "#f8f560"}])
// client.sendArray([{m: "setcolor", _id: "_id", color: "#f8f560"}])
// client.sendArray([{m: "setname", _id: _id, name: "bad owl"}]);
// client.sendArray([{m: "setname", _id: _id, name: "♩Stingay Bob♩"}]);
// setInterval(() => {
// client.sendArray([{m: "setname", _id: _id, name: "Anonymous"}]);