mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-02-24 23:38:32 +00:00
28 lines
908 B
TypeScript
28 lines
908 B
TypeScript
import { Devs } from "../utils/constants";
|
|
import definePlugin from "../utils/types";
|
|
|
|
export default definePlugin({
|
|
name: "isStaff",
|
|
description:
|
|
"Gives access to client devtools & other things locked behind isStaff",
|
|
authors: [Devs.Megu],
|
|
patches: [
|
|
{
|
|
find: ".isStaff=function(){",
|
|
replacement: [
|
|
{
|
|
match: /(\w+)\.isStaff=function\(\){return\s*!1};/,
|
|
replace: "$1.isStaff=function(){return true};",
|
|
},
|
|
{
|
|
match: /return\s*\w+\.hasFlag\(.+?STAFF\)}/,
|
|
replace: "return true}",
|
|
},
|
|
{
|
|
match: /hasFreePremium=function\(\){return this.isStaff\(\)\s*\|\|/,
|
|
replace: "hasFreePremium=function(){return ",
|
|
},
|
|
],
|
|
},
|
|
],
|
|
});
|