Merge pull request #1 from AITEx64/main
Continuously search for the current user object
This commit is contained in:
commit
efec65ed5b
12
index.js
12
index.js
@ -1,5 +1,5 @@
|
||||
const { Plugin } = require('powercord/entities');
|
||||
const { React, getModule } = require('powercord/webpack');
|
||||
const { getModule } = require('powercord/webpack');
|
||||
const { inject, uninject } = require('powercord/injector');
|
||||
|
||||
const Settings = require('./components/settings.jsx');
|
||||
@ -16,7 +16,15 @@ module.exports = class NitroBypass extends Plugin {
|
||||
const currentUser = await getModule(['getCurrentUser']);
|
||||
|
||||
// spoof client side premium
|
||||
currentUser.getCurrentUser().premiumType = 2;
|
||||
let tries = 1;
|
||||
let intervalId = setInterval(() => {
|
||||
if (++tries > 5) clearInterval(intervalId);
|
||||
|
||||
const user = currentUser.getCurrentUser();
|
||||
if (!user) return;
|
||||
user.premiumType = 2;
|
||||
clearInterval(intervalId);
|
||||
}, 1000);
|
||||
|
||||
const emojiReplacePatch = this.emojiReplacePatch.bind(this);
|
||||
inject('replace-on-send', message, 'sendMessage', emojiReplacePatch, true);
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Nitro Bypass",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.4",
|
||||
"description": "Send any emoji and screen share in high quality.",
|
||||
"author": "oSumAtrIX#5767",
|
||||
"license": "GPL-3.0"
|
||||
|
Loading…
Reference in New Issue
Block a user