Skip to content

Commit 7e4743b

Browse files
author
m1-dev
committed
add guildOnly deprecation warning
1 parent 9bb4bd8 commit 7e4743b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,14 @@ export class CommandHandler {
146146
commandObj.category = commandCategory;
147147
}
148148

149+
if (commandObj.options?.guildOnly) {
150+
console.log(
151+
colors.yellow(
152+
`ℹ️ Warning: Command ${commandObj.data.name} uses options.guildOnly, which will be deprecated soon. Please use the data.dm_permission boolean instead.`,
153+
),
154+
);
155+
}
156+
149157
this.#data.commands.push(commandObj);
150158
}
151159
}

0 commit comments

Comments
 (0)