From 4d9ed056a72120dd9a0ae93c64f9afddf4dc7766 Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Mon, 10 Jul 2023 21:07:24 +0500 Subject: [PATCH] oi --- events/Guild/guildMemberAdd.js | 2 +- events/Guild/guildMemberRemove.js | 2 +- events/Guild/guildMemberUpdate.js | 2 +- events/MessageHandler.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/events/Guild/guildMemberAdd.js b/events/Guild/guildMemberAdd.js index f1eaca59..441f5964 100644 --- a/events/Guild/guildMemberAdd.js +++ b/events/Guild/guildMemberAdd.js @@ -33,7 +33,7 @@ class GuildMemberAdd extends BaseEvent { await member.guild.members.fetch(); const guildData = await client.findOrCreateGuild({ - id: member.guildId, + id: member.guild.id, }); if (guildData.plugins.autorole.enabled) member.roles.add(guildData.plugins.autorole.role); diff --git a/events/Guild/guildMemberRemove.js b/events/Guild/guildMemberRemove.js index d170cb55..a3bc202f 100644 --- a/events/Guild/guildMemberRemove.js +++ b/events/Guild/guildMemberRemove.js @@ -33,7 +33,7 @@ class GuildMemberRemove extends BaseEvent { await member.guild.members.fetch(); const guildData = await client.findOrCreateGuild({ - id: member.guildId, + id: member.guild.id, }); if (guildData.plugins.goodbye.enabled) { diff --git a/events/Guild/guildMemberUpdate.js b/events/Guild/guildMemberUpdate.js index a3c3aa90..d97417ab 100644 --- a/events/Guild/guildMemberUpdate.js +++ b/events/Guild/guildMemberUpdate.js @@ -16,7 +16,7 @@ class GuildMemberUpdate extends BaseEvent { */ async execute(client, oldMember, newMember) { if (oldMember.guild && oldMember.guildId === "568120814776614924") return; - if (oldMember.guildId !== client.config.support.id) return; + if (oldMember.guild.id !== client.config.support.id) return; if (oldMember.roles.cache.some(r => r.id === "940149470975365191")) return; if (newMember?.roles.cache.some(r => r.id === "940149470975365191")) { diff --git a/events/MessageHandler.js b/events/MessageHandler.js index a0614945..a79327c6 100644 --- a/events/MessageHandler.js +++ b/events/MessageHandler.js @@ -30,7 +30,7 @@ class MessageCreate extends BaseEvent { if (message.guild && !message.member) await message.guild.members.fetch(message.author.id); if (message.guild) { const guildData = await client.findOrCreateGuild({ id: message.guildId }); - const memberData = await client.findOrCreateMember({ id: message.author.id, guildId: message.guild.id }); + const memberData = await client.findOrCreateMember({ id: message.author.id, guildId: message.guildId }); message.guild.data = data.guildData = guildData; data.memberData = memberData;