We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db41d5c commit 02fc101Copy full SHA for 02fc101
packages/discord.js/src/errors/DJSError.js
@@ -12,11 +12,15 @@ const { Messages } = require('./Messages.js');
12
* @ignore
13
*/
14
function makeDiscordjsError(Base) {
15
- return class DiscordjsError extends Base {
+ return class extends Base {
16
+ static {
17
+ Object.defineProperty(this, 'name', { value: `Discordjs${Base.name}` });
18
+ }
19
+
20
constructor(code, ...args) {
21
super(message(code, args));
22
this.code = code;
- Error.captureStackTrace?.(this, DiscordjsError);
23
+ Error.captureStackTrace(this, this.constructor);
24
}
25
26
get name() {
0 commit comments