You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In 14.12.0 the Client.destroy() method has been changed to be async, however it seems to have only caused more problems (at least for me).
As you can see below, I just have a couple of Event Listeners attached to the process so they can be caught and dealt with. I did try using async/await but the result is identical. The result being the following error message:
TypeError: Cannot read properties of undefined (reading 'clearHashSweeper')
at Client.destroy (E:\coding-projects\hifumi-js\node_modules\.pnpm\discord.js@14.12.0_bufferutil@4.0.7_utf-8-validate@5.0.10\node_modules\discord.js\src\client\BaseClient.js:47:30)
at Client.destroy (E:\coding-projects\hifumi-js\node_modules\.pnpm\discord.js@14.12.0_bufferutil@4.0.7_utf-8-validate@5.0.10\node_modules\discord.js\src\client\Client.js:248:11)
at process.<anonymous> (E:\coding-projects\hifumi-js\src\app.ts:90:14)
at process.emit (E:\coding-projects\hifumi-js\lib\events.js:513:28)
at process.emit (E:\coding-projects\hifumi-js\lib\domain.js:489:12)
at process.emit.sharedData.processEmitHook.installedValue [as emit] (E:\coding-projects\hifumi-js\node_modules\.pnpm\@cspotcode+source-map-support@0.8.1\node_modules\@cspotcode\source-map-support\source-map-support.js:745:40) {stack: 'TypeError: Cannot read properties of undefine…rce-map-support\source-map-support.js:745:40)', message: 'Cannot read properties of undefined (reading 'clearHashSweeper')'}
Not sure what's up with this, especially the part with the lib folder. Cause there's no such folder in that directory in the first place. Note that this is with ts-node, if I run the program normally as JS i get the following error:
TypeError: Cannot read properties of undefined (reading 'clearHashSweeper')
at Client.destroy (E:\coding-projects\hifumi-js\node_modules\.pnpm\discord.js@14.12.0_bufferutil@4.0.7_utf-8-validate@5.0.10\node_modules\discord.js\src\client\BaseClient.js:47:30)
at Client.destroy (E:\coding-projects\hifumi-js\node_modules\.pnpm\discord.js@14.12.0_bufferutil@4.0.7_utf-8-validate@5.0.10\node_modules\discord.js\src\client\Client.js:248:11)
at process.<anonymous> (file:///E:/coding-projects/hifumi-js/dist/app.js:71:14)
at process.emit (node:events:513:28)
I looked into it a bit more and for some reason destroy() is accessing a non existent field on the REST class. It's not that the value is undefined, it's not listed in the definition at all.
/** * The REST manager of the client * @type {REST} */this.rest=newREST(this.options.rest);}/** * Destroys all assets used by the base client. * @returns {void} */destroy(){this.rest.requestManager.clearHashSweeper();this.rest.requestManager.clearHandlerSweeper();}
Which package is this bug report for?
discord.js
Issue description
In 14.12.0 the
Client.destroy()
method has been changed to be async, however it seems to have only caused more problems (at least for me).As you can see below, I just have a couple of Event Listeners attached to the process so they can be caught and dealt with. I did try using async/await but the result is identical. The result being the following error message:
Not sure what's up with this, especially the part with the
lib
folder. Cause there's no such folder in that directory in the first place. Note that this is with ts-node, if I run the program normally as JS i get the following error:Code sample
Versions
Issue priority
Medium (should be fixed soon)
Which partials do you have configured?
Not applicable
Which gateway intents are you subscribing to?
Not applicable
I have tested this issue on a development release
No response
The text was updated successfully, but these errors were encountered: