Фикс команд в ЛС (Они всё это время не работали..)

This commit is contained in:
JonnyBro 2022-10-09 18:16:10 +05:00
parent 40e62c5af5
commit 4b84ea832f
3 changed files with 4 additions and 4 deletions

View file

@ -14,11 +14,11 @@ class BaseCommand {
/**
* @type {Boolean}
*/
this.guildOnly = options.guildOnly || true;
this.guildOnly = (options.guildOnly === true ? true : false) || false;
/**
* @type {Boolean}
*/
this.ownerOnly = options.ownerOnly || false;
this.ownerOnly = (options.ownerOnly === true ? true : false) || false;
this.dirname = options.dirname || false;
/**
* @type {String}

View file

@ -16,7 +16,7 @@ class Help extends BaseCommand {
.setDescription(client.translate("owner/reload:COMMAND"))),
aliases: [],
dirname: __dirname,
guildOnly: true,
guildOnly: false,
ownerOnly: false
});
}

View file

@ -26,7 +26,7 @@ class CommandHandler extends BaseEvent {
data.userData = userData;
if (command.guildOnly && !interaction.inGuild()) return interaction.replyT("misc:GUILD_ONLY", { ephemeral: true });
if (command.ownerOnly && interaction.member.id !== client.config.owner.id) return interaction.replyT("misc:OWNER_ONLY", { ephemeral: true });
if (command.ownerOnly && interaction.user.id !== client.config.owner.id) return interaction.replyT("misc:OWNER_ONLY", { ephemeral: true });
if (interaction.inGuild()) {
const guildData = await client.findOrCreateGuild({