Core Library for VIP BOT
目前為
此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.cn-greasyfork.org/scripts/522438/1512721/VIPCorejs.js
// ==UserScript==
// @name VIPCore.js
// @namespace https://i.imgur.com/tdC3R86.png
// @version 1.0.0
// @description Core Library for VIP BOT
// @author CryptHowl
// @license MIT
// @run-at document-start
// ==/UserScript==
class VIPCore {
constructor(options = {}) {
this.options = options;
this.debugMode = options.debugMode || false;
}
log(message) {
if (this.debugMode) {
console.log(`[VIP BOT]: ${message}`);
}
}
warn(message) {
console.warn(`[VIP BOT WARNING]: ${message}`);
}
error(message) {
console.error(`[VIP BOT ERROR]: ${message}`);
}
async delay(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
}
// VIPCore'u global bir değişken olarak kaydediyoruz.
window.VIPCore = VIPCore;