discord-api-docs
discord-api-docs copied to clipboard
[commands v2] Client does not clear local cache on invalid command
Description
The official client does not clear its command cache upon an invalid application command error. This is a problem as I have updated some commands (deleted a few and added others), and I do not want to require all users to refresh their client before they are able to use my new commands, nor receive errors of invalid commands.
Steps to Reproduce
- Use a command
- delete said command
- attempt to use it again
- the command returns an error that it is invalid
- try to use it yet again
Expected Behavior
Client cache refreshes after first attempt to use invalid command.
Current Behavior
Client cache does not refresh.
Screenshots/Videos

Client and System Information
Canary 126832 (7910bd0) Host 1.0.46 Windows 10 64-Bit (10.0.22610)
Noticed this as well. I found I could type / to open the command menu and specifically click on the application icon to open the bot's commands and trigger a reload for the command cache though. This bug didn't happen before v2 systems.
Switching channels should also clear the cache from what I heard.