This commit is contained in:
Zack Rauen 2020-03-15 02:22:55 -04:00
parent ad7cd97cf2
commit 93e01bb111
3 changed files with 21 additions and 21 deletions

File diff suppressed because one or more lines are too long

2
js/main.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -42,25 +42,25 @@ Core.prototype.init = async function() {
`); `);
} }
const SortedGuildStore = BDV2.WebpackModules.findByUniqueProperties(["getSortedGuilds"]); // const SortedGuildStore = BDV2.WebpackModules.findByUniqueProperties(["getSortedGuilds"]);
const GuildMemberStore = BDV2.WebpackModules.findByUniqueProperties(["getMember"]); // const GuildMemberStore = BDV2.WebpackModules.findByUniqueProperties(["getMember"]);
const userId = BDV2.UserStore.getCurrentUser().id; // const userId = BDV2.UserStore.getCurrentUser().id;
const checkForRole = async (serverId, roleId) => { // const checkForRole = async (serverId, roleId) => {
if (!SortedGuildStore || !GuildMemberStore) return false; // if (!SortedGuildStore || !GuildMemberStore) return false;
const hasServer = SortedGuildStore.getFlattenedGuildIds().includes(serverId); // const hasServer = SortedGuildStore.getFlattenedGuildIds().includes(serverId);
const member = GuildMemberStore.getMember(serverId, userId); // const member = GuildMemberStore.getMember(serverId, userId);
return (hasServer && member ? member.roles.includes(roleId) : false); // return (hasServer && member ? member.roles.includes(roleId) : false);
}; // };
const checkForBetaAccess = async () => { // const checkForBetaAccess = async () => {
if (userId === "197435711476072449") return false; // if (userId === "197435711476072449") return false;
const isDonor = checkForRole("292141134614888448", "452687773678436354"); // const isDonor = checkForRole("292141134614888448", "452687773678436354");
const isPluginDev = checkForRole("86004744966914048", "125166040689803264") || checkForRole("280806472928198656", "357242595950329857"); // const isPluginDev = checkForRole("86004744966914048", "125166040689803264") || checkForRole("280806472928198656", "357242595950329857");
return (isDonor || isPluginDev); // return (isDonor || isPluginDev);
}; // };
const shouldHaveBeta = checkForBetaAccess(); // const shouldHaveBeta = checkForBetaAccess();
if (!shouldHaveBeta) { // if (!shouldHaveBeta) {
Utils.alert("Beta Access", `You don't seem like you should have Beta Access... how did you get here?`); // Utils.alert("Beta Access", `You don't seem like you should have Beta Access... how did you get here?`);
} // }
Utils.log("Startup", "Initializing Settings"); Utils.log("Startup", "Initializing Settings");
this.initSettings(); this.initSettings();