We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b71b56 commit 50a04d1Copy full SHA for 50a04d1
src/lib/structures/Command.ts
@@ -90,10 +90,11 @@ export abstract class Command<T = Args> extends AliasPiece {
90
91
const run = Reflect.get(this, 'run');
92
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
- );
+ process.emitWarning('The "run" method in commands is deprecated.', {
+ type: 'DeprecationWarning',
+ code: 'SLASH_COMMAND_MIGRATION',
+ detail: `Use "messageRun" instead (seen in "${this.name}", at "${this.location.full}")`
97
+ });
98
Reflect.set(this, 'messageRun', run);
99
}
100
0 commit comments