Skip to content

Commit 7ca6a44

Browse files
author
m1-dev
committed
add guildOnly deprecation warning in console
1 parent 8e673af commit 7ca6a44

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

packages/commandkit/src/handlers/command-handler/CommandHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export class CommandHandler {
149149
if (commandObj.options?.guildOnly) {
150150
console.log(
151151
colors.yellow(
152-
`ℹ️ Warning: Command ${commandObj.data.name} uses options.guildOnly, which will be deprecated soon. Please use the data.dm_permission boolean instead.`,
152+
`ℹ️ Deprecation Warning: The command "${commandObj.data.name}" uses options.guildOnly, which will be deprecated soon. Please use the data.dm_permission boolean instead.`,
153153
),
154154
);
155155
}

packages/commandkit/tests/src/commands/misc/ping.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,7 @@ export async function run({ interaction, client }: SlashCommandProps) {
7474

7575
export const options: CommandOptions = {
7676
devOnly: true,
77+
78+
// Test deprecation warning.
79+
guildOnly: true,
7780
};

0 commit comments

Comments
 (0)