Plugin News: Patch Fixes and Features #149
Closed
JustOptimize
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone, as you all saw, the plugin broke with a recent discord update.
Don't worry, it has been fixed and now it is working better than ever with more features than before.
What Have I Done to Ensure Future Stability?
Got rid of destructuring assignments
When using a destructuring assignment like
const { example = null } = a_random_module;
it throws an error if the module is undefined.To prevent that I replaced all instances of destructuring assignment with a nullish coalescing operator (
const example = a_random_module?.example
) that instead sets the variable tonull
if the module doesn't existWrote a verification check that actually prevents crashing
Variable verification checks were already in place to warn me if some modules went bad but it didn't stop the plugin from working so in case of crashing on startup the auto updater would break too.
From now on I will warn the user if he wants to start the plugin anyways and will be running the updater prior to that so he will be notified in case of a bug fix.
Modules Updates
With the help of @Tharki-God I updated the way the plugin gets the modules using the actual prop names (added by the new discord updated) for the majority of them
Patch disabler (Work in Progress)
Patches will be automatically disabled if the associated Discord module is undefined. For instance, if the module controlling unread notifications is missing, the plugin will refrain from attempting to patch it so you will see unread notification for hidden channels instead of making your discord crash
Beta Was this translation helpful? Give feedback.
All reactions