Skip to content

Commit 50a04d1

Browse files
committed
1 parent 5b71b56 commit 50a04d1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/lib/structures/Command.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,11 @@ export abstract class Command<T = Args> extends AliasPiece {
9090

9191
const run = Reflect.get(this, 'run');
9292
if (typeof run === 'function' && !Reflect.has(this, 'messageRun')) {
93-
process.emitWarning(
94-
`The "run" method in commands is deprecated. Use "messageRun" instead (seen in "${this.name}", at "${this.location.full}")`,
95-
'DeprecationWarning'
96-
);
93+
process.emitWarning('The "run" method in commands is deprecated.', {
94+
type: 'DeprecationWarning',
95+
code: 'SLASH_COMMAND_MIGRATION',
96+
detail: `Use "messageRun" instead (seen in "${this.name}", at "${this.location.full}")`
97+
});
9798
Reflect.set(this, 'messageRun', run);
9899
}
99100
}

0 commit comments

Comments
 (0)