use default member perms for slash commands

This commit is contained in:
Erik 2022-05-09 22:57:02 +03:00
parent aea940f568
commit db2ff57224
Signed by untrusted user: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB

View File

@ -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
};
}