Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Plugins without start/stop function failing to stop/start #2463

Merged
merged 3 commits into from
May 16, 2024

Conversation

waresnew
Copy link
Contributor

Fixes #2462

the issue mentioned above applies to all plugins without a start/stop function defined (like MoreKaomoji)

this occurs because the stopPlugin and startPlugin functions in plugins/index.ts rely on a stop/start function being defined respectively

so when I disable VcNarrator, p.started will still be true bc VcNarrator doesn't have a stop() function defined

then when i try to enable it again, it'll error bc it thinks it's already started

fix is to move the p.started = true/false to after that if statement

this way if start() errored then it'll return early and won't set p.started (so everything else should still work as intended)

@waresnew waresnew changed the title fix: Plugins without start/stop function failing to start/stop fix: Plugins without start/stop function failing to stop/start May 15, 2024
@Nuckyz Nuckyz changed the base branch from main to dev May 16, 2024 01:45
@Nuckyz Nuckyz enabled auto-merge (squash) May 16, 2024 01:45
@Nuckyz
Copy link
Collaborator

Nuckyz commented May 16, 2024

Thanks for the fix!

@Nuckyz Nuckyz merged commit 0460374 into Vendicated:dev May 16, 2024
1 check passed
@waresnew waresnew deleted the fix-2462 branch May 16, 2024 02:22
LunaisLazier pushed a commit to LunaisLazier/Mooncord that referenced this pull request May 21, 2024
Autumnlight02 pushed a commit to Autumnlight02/Vencord that referenced this pull request Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] VcNarrator doesn't work / crashes while starting
2 participants