From db2ff57224962a22a17d600a78d87538ac77791a Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Mon, 9 May 2022 22:57:02 +0300 Subject: [PATCH] use default member perms for slash commands --- src/structure/interfaces/commands/SlashCommand.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/structure/interfaces/commands/SlashCommand.js b/src/structure/interfaces/commands/SlashCommand.js index 66936d4..ad773d3 100644 --- a/src/structure/interfaces/commands/SlashCommand.js +++ b/src/structure/interfaces/commands/SlashCommand.js @@ -1,5 +1,6 @@ const Command = require('./Command.js'); const { Commands: CommandsConstant } = require('../../../constants/'); +const { Permissions } = require('discord.js'); // eslint-disable-next-line no-unused-vars // const { DiscordClient } = require('../../DiscordClient.js'); @@ -46,7 +47,9 @@ class SlashCommand extends Command { options: this.options.map((o) => o.shape), // defaultPermission: this.defaultPermission, // eslint-disable-next-line camelcase - dm_permission: !this.guildOnly + dm_permission: !this.guildOnly, + // eslint-disable-next-line camelcase + default_member_permissions: this.memberPermissions.length ? new Permissions(this.memberPermissions).bitfield.toString() : null }; }