Skip to content

Commit 26dc7d5

Browse files
committed
feat: add possibility to set command available in dm or not
1 parent ec7ded8 commit 26dc7d5

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/types/commands.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ export interface CommandConfig<T extends OptionsDef = OptionsDef> {
169169
nsfw?: boolean
170170
userPermissions?: PermissionsString[]
171171
preconditions?: string[]
172+
dm?: boolean
172173
}
173174

174175
export type CommandExecute<T extends OptionsDef = OptionsDef> = (

src/utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export const slashToJSON = (cmd: HarmonixCommand<OptionsDef>) => {
2424
)
2525
)
2626
.setNSFW(cmd.config.nsfw || false)
27+
.setDMPermission(cmd.config.dm || false)
2728

2829
if (cmd.config.options) {
2930
for (const name in cmd.config.options) {

0 commit comments

Comments
 (0)