Skip to content

Commit

Permalink
refactor: Змінено змінені назви функцій
Browse files Browse the repository at this point in the history
Змінено змінені раніше назви функцій бази данних на нові
  • Loading branch information
GamesTwoLife committed Mar 12, 2024
1 parent 298e03e commit d399d17
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion events/Guild/guildMemberAdd.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
},
Expand Down
4 changes: 2 additions & 2 deletions events/Guild/guildMemberRemove.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
},
};
4 changes: 2 additions & 2 deletions events/Message/messageCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down

0 comments on commit d399d17

Please sign in to comment.