mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-21 20:54:58 +05:00
Фикс команд в ЛС (Они всё это время не работали..)
This commit is contained in:
parent
40e62c5af5
commit
4b84ea832f
3 changed files with 4 additions and 4 deletions
|
@ -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}
|
||||
|
|
|
@ -16,7 +16,7 @@ class Help extends BaseCommand {
|
|||
.setDescription(client.translate("owner/reload:COMMAND"))),
|
||||
aliases: [],
|
||||
dirname: __dirname,
|
||||
guildOnly: true,
|
||||
guildOnly: false,
|
||||
ownerOnly: false
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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({
|
||||
|
|
Loading…
Reference in a new issue