Skip to content

Commit 0440147

Browse files
committed
fix(createApplicationCommand): typo in dmPermission which prevented dm execution
1 parent 3ad0c82 commit 0440147

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/functions/interaction/createApplicationCommand.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ module.exports = async (d) => {
66
const data = d.util.aoiFunc(d);
77
if (data.err) return d.error(data.err);
88

9-
let [guildID, name, description, defaultPermission = "true", dmPermissions = "true", type = "slash", ...opts] = data.inside.splits;
9+
let [guildID, name, description, defaultPermission = "true", dmPermission = "true", type = "slash", ...opts] = data.inside.splits;
1010
name = name.addBrackets();
1111
let options;
1212
let appData;
1313

14-
if (dmPermissions != "true" && dmPermissions != "false") return d.aoiError.fnError(d, "custom", {}, "dmPermissions expects to be boolean");
14+
if (dmPermission != "true" && dmPermission != "false") return d.aoiError.fnError(d, "custom", {}, "dmPermission expects to be boolean");
1515
if (defaultPermission != "true" && defaultPermission != "false") return d.aoiError.fnError(d, "custom", {}, "defaultPermission expects to be boolean");
1616

1717
const guild = guildID === "global" ? undefined : guildID === "custom" ? "custom" : await d.util.getGuild(d, guildID);
@@ -45,7 +45,7 @@ module.exports = async (d) => {
4545
type,
4646
description: description?.addBrackets(),
4747
defaultMemberPermission: defaultPermission === "true",
48-
dmPermissions: dmPermissions === "true",
48+
dmPermission: dmPermission === "true",
4949
options
5050
},
5151
guildID: guild?.id

0 commit comments

Comments
 (0)