change form of Developers in constant module

pull/95/head
dperolio 2 years ago
parent bb553cb47a
commit cb62841296
No known key found for this signature in database
GPG Key ID: 4191689562D51409

@ -181,7 +181,7 @@ export default class Plugin extends Updatable {
* No need to use extra resources watching something that shouldn't need it.
*/
if (!this.manifest) {
if (!vizality.settings.get('vizalityDeveloper', false)) {
if (!vizality.settings.get('developer', false)) {
this._watcherEnabled = false;
} else {
this._watcherEnabled = vizality.settings.get('hotReload', false);

@ -187,11 +187,13 @@ export default class Vizality extends Updatable {
this.emit(Events.VIZALITY_SETTINGS_READY);
/**
* Check if the current user is a verified Vizality Developer.
* Check if the current user is a Vizality Developer.
*/
const currentUserId = (await import('@discord/user')).getCurrentUser()?.id;
if (Developers.includes(currentUserId)) {
this.settings.set('vizalityDeveloper', true);
if (Developers.some(developer => developer.id === currentUserId)) {
this.settings.set('developer', true);
} else {
this.settings.set('developer', false);
}
/**
@ -368,7 +370,7 @@ export default class Vizality extends Updatable {
/**
* Check if the user is a Vizality developer.
*/
if (this.settings.get('vizalityDeveloper', false)) {
if (this.settings.get('developer', false)) {
const path = join(Directories.STYLES, 'main.scss');
const compiler = resolveCompiler(path);
const style = createElement('style', { id, 'vz-style': '' });

@ -54,7 +54,7 @@ export const Icons = {};
* alerted about this.
*/
vizality.once(Events.VIZALITY_SETTINGS_READY, async () => {
if (vizality.settings.get('vizalityDeveloper')) {
if (vizality.settings.get('developer')) {
/*
* These are Discord's icons that will crash the appl if attempted to render as a normal icon.
*/

@ -164,7 +164,7 @@ export const ErrorTypes = Object.freeze({
});
export const Developers = Object.freeze([
'97549189629636608' // dperolio
{ username: 'dperolio', id: '97549189629636608' }
]);
export const DefaultSettings = Object.freeze({

Loading…
Cancel
Save