This commit is contained in:
JonnyBro 2022-10-03 20:24:49 +05:00
parent 76ab9c38a0
commit daf475054b
2 changed files with 5 additions and 5 deletions

View file

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

View file

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