From d399d17e990973800585d6894df0667068c19823 Mon Sep 17 00:00:00 2001 From: GamesTwoLifeTwoLife Date: Tue, 12 Mar 2024 14:44:20 +0200 Subject: [PATCH] =?UTF-8?q?refactor:=20=D0=97=D0=BC=D1=96=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=20=D0=B7=D0=BC=D1=96=D0=BD=D0=B5=D0=BD=D1=96=20?= =?UTF-8?q?=D0=BD=D0=B0=D0=B7=D0=B2=D0=B8=20=D1=84=D1=83=D0=BD=D0=BA=D1=86?= =?UTF-8?q?=D1=96=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Змінено змінені раніше назви функцій бази данних на нові --- events/Guild/guildMemberAdd.js | 2 +- events/Guild/guildMemberRemove.js | 4 ++-- events/Message/messageCreate.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/events/Guild/guildMemberAdd.js b/events/Guild/guildMemberAdd.js index 7f3aa79..3f6b282 100644 --- a/events/Guild/guildMemberAdd.js +++ b/events/Guild/guildMemberAdd.js @@ -9,7 +9,7 @@ module.exports = { async execute(member) { const { client, guild } = member; - const user = await client.dbuser.getUserById(guild.id, member.id); + const user = await client.dbuser.getUser(guild.id, member.id); if (!user) await client.dbuser.createUser({ guildID: guild.id, userID: member.id }); }, diff --git a/events/Guild/guildMemberRemove.js b/events/Guild/guildMemberRemove.js index e3428ec..243850e 100644 --- a/events/Guild/guildMemberRemove.js +++ b/events/Guild/guildMemberRemove.js @@ -9,8 +9,8 @@ module.exports = { async execute(member) { const { client, guild } = member; - const user = await client.dbuser.getUserById(guild.id, member.id); + const user = await client.dbuser.getUser(guild.id, member.id); - if (user) await client.dbuser.deleteUserById(guild.id, member.id); + if (user) await client.dbuser.deleteUser(guild.id, member.id); }, }; diff --git a/events/Message/messageCreate.js b/events/Message/messageCreate.js index 99cac11..6faeb54 100644 --- a/events/Message/messageCreate.js +++ b/events/Message/messageCreate.js @@ -18,8 +18,8 @@ module.exports = { await message.react('👀'); } - const guild_data = await client.dbguild.getGuildById(guild.id); - const user_data = await client.dbuser.getUserById(guild.id, author.id); + const guild_data = await client.dbguild.getGuild(guild.id); + const user_data = await client.dbuser.getUser(guild.id, author.id); if (!guild_data) await client.dbguild.createGuild({ guildID: guild.id }); if (!user_data) await client.dbuser.createUser({ guildID: guild.id, userID: author.id });