Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit02fc101

Browse files
authored
fix(DJSError): Differentiate error type (#11295)
* fix(DJSError): differentiate error type* fix: remove `?.`
1 parentdb41d5c commit02fc101

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎packages/discord.js/src/errors/DJSError.js‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ const { Messages } = require('./Messages.js');
1212
*@ignore
1313
*/
1414
functionmakeDiscordjsError(Base){
15-
returnclassDiscordjsErrorextendsBase{
15+
returnclassextendsBase{
16+
static{
17+
Object.defineProperty(this,'name',{value:`Discordjs${Base.name}`});
18+
}
19+
1620
constructor(code, ...args){
1721
super(message(code,args));
1822
this.code=code;
19-
Error.captureStackTrace?.(this,DiscordjsError);
23+
Error.captureStackTrace(this,this.constructor);
2024
}
2125

2226
getname(){

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp