From daf475054babef41a7f37285424b1c6dda584a57 Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Mon, 3 Oct 2022 20:24:49 +0500 Subject: [PATCH] =?UTF-8?q?=D1=83=D0=BF=D1=81=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/Administration/set.js | 4 ++-- commands/Owner/debug.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/commands/Administration/set.js b/commands/Administration/set.js index 79073313..b04e5a04 100644 --- a/commands/Administration/set.js +++ b/commands/Administration/set.js @@ -46,12 +46,12 @@ class Set extends BaseCommand { * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Object} data */ - async execute(client, interaction, data) { + async execute(client, interaction) { const type = interaction.options.getString("type"); const member = interaction.options.getMember("user"); if (member.user.bot) return interaction.error("misc:BOT_USER", null, { ephemeral: true }); - const memberData = member.id === interaction.user.id ? data : await client.findOrCreateMember({ + const memberData = await client.findOrCreateMember({ id: member.id, guildId: interaction.guildId }); diff --git a/commands/Owner/debug.js b/commands/Owner/debug.js index 73052fd5..6b6cf5d0 100644 --- a/commands/Owner/debug.js +++ b/commands/Owner/debug.js @@ -68,7 +68,7 @@ class Debug extends BaseCommand { * @param {import("discord.js").ChatInputCommandInteraction} interaction * @param {Array} data */ - async execute(client, interaction, data) { + async execute(client, interaction) { const command = interaction.options.getSubcommand(); if (command === "set") { @@ -78,7 +78,7 @@ class Debug extends BaseCommand { const userData = await client.findOrCreateUser({ id: member.id }); - const memberData = member.id === interaction.user.id ? data : await client.findOrCreateMember({ + const memberData = await client.findOrCreateMember({ id: member.id, guildId: interaction.guildId }); @@ -137,7 +137,7 @@ class Debug extends BaseCommand { const userData = await client.findOrCreateUser({ id: member.id }); - const memberData = member.id === interaction.user.id ? data : await client.findOrCreateMember({ + const memberData = await client.findOrCreateMember({ id: member.id, guildId: interaction.guildId });