Please explain where need to write this code. I have re-read the documentation on this code more than a dozen times and still did not understand. When I try to write this code in files that are responsible for events, I get an error:
node:events:497 throw er; // Unhandled 'error' event ^ReferenceError: client is not defined
node:events:497 throw er; // Unhandled 'error' event ^ReferenceError: client is not defined
A similar error occurred when trying to insert this code into the command itself.