From 81f69ccd9ec626f8b05446b1feebb16ce13a9ea5 Mon Sep 17 00:00:00 2001 From: Yuki Date: Sun, 6 Mar 2022 11:49:18 +0100 Subject: [PATCH] Update index.js did this on my phone but should work --- index.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 05cf306..0f0a8c9 100644 --- a/index.js +++ b/index.js @@ -16,6 +16,8 @@ module.exports = class NitroBypass extends Plugin { const currentUser = await getModule(['getCurrentUser']); // spoof client side premium + var tries = 0; + var maxTries = 5; this.log("Checking for currentUser..."); var x = setInterval(() => { var user = currentUser.getCurrentUser(); @@ -24,9 +26,14 @@ module.exports = class NitroBypass extends Plugin { this.log("Spoofed!"); clearInterval(x); } else { - this.log("currentUser not found, retrying in 1s..."); + this.log("currentUser not found, retrying in 5s..."); } - }, 1000); + if(tries > maxTries) { + this.error("Failed to find currentUser."); + clearInterval(x); + } + tries++; + }, 5000); const emojiReplacePatch = this.emojiReplacePatch.bind(this); inject('replace-on-send', message, 'sendMessage', emojiReplacePatch, true);