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(Command): Do not attempt to execute application command reloading logic when a command does not have any application commands #598

Merged
merged 4 commits into from
Feb 8, 2023

Conversation

favna
Copy link
Member

@favna favna commented Feb 5, 2023

Back in v2.5.1 the Command class did not have an overwritten reload method at all: https://github.com/sapphiredev/framework/blob/v2.5.1/src/lib/structures/Command.ts

This suggests that we didn't actually need to overwrite the reload method when the command to be reloaded doesn't have any chat input or context menu commands. To this end, after this change, whenever a command is exclusively a message command it will also exclusively call super.reload().

@favna favna self-assigned this Feb 5, 2023
src/lib/structures/Command.ts Outdated Show resolved Hide resolved
@favna
Copy link
Member Author

favna commented Feb 5, 2023

@sapphiredev pack

@sapphiredev
Copy link

sapphiredev bot commented Feb 5, 2023

Heya @favna, I've started to run the deployment workflow on this PR at 60fada2. You can monitor the build here!

@sapphiredev
Copy link

sapphiredev bot commented Feb 5, 2023

Hey @favna, I've released this to NPM. You can install it for testing like so:

npm install @sapphire/framework@pr-598

vladfrangu
vladfrangu previously approved these changes Feb 5, 2023
@favna favna changed the title fix(Command): Do not execute complex reloading logic when a command does not have any application commands fix(Command): Do not attempt to execute application command reloading logic when a command does not have any application commands Feb 5, 2023
@favna favna force-pushed the fix/command-simple-reload-for-message-commands branch from 60fada2 to 37ba497 Compare February 5, 2023 22:20
@githubUser982
Copy link

Works great, thanks.

@favna favna merged commit 61e96d2 into main Feb 8, 2023
@favna favna deleted the fix/command-simple-reload-for-message-commands branch February 8, 2023 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants