This commit is contained in:
Jonny_Bro (Nikita) 2023-07-10 21:07:24 +05:00
parent 741fd8d3d5
commit 4d9ed056a7
4 changed files with 4 additions and 4 deletions

View file

@ -33,7 +33,7 @@ class GuildMemberAdd extends BaseEvent {
await member.guild.members.fetch(); await member.guild.members.fetch();
const guildData = await client.findOrCreateGuild({ const guildData = await client.findOrCreateGuild({
id: member.guildId, id: member.guild.id,
}); });
if (guildData.plugins.autorole.enabled) member.roles.add(guildData.plugins.autorole.role); if (guildData.plugins.autorole.enabled) member.roles.add(guildData.plugins.autorole.role);

View file

@ -33,7 +33,7 @@ class GuildMemberRemove extends BaseEvent {
await member.guild.members.fetch(); await member.guild.members.fetch();
const guildData = await client.findOrCreateGuild({ const guildData = await client.findOrCreateGuild({
id: member.guildId, id: member.guild.id,
}); });
if (guildData.plugins.goodbye.enabled) { if (guildData.plugins.goodbye.enabled) {

View file

@ -16,7 +16,7 @@ class GuildMemberUpdate extends BaseEvent {
*/ */
async execute(client, oldMember, newMember) { async execute(client, oldMember, newMember) {
if (oldMember.guild && oldMember.guildId === "568120814776614924") return; 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 (oldMember.roles.cache.some(r => r.id === "940149470975365191")) return;
if (newMember?.roles.cache.some(r => r.id === "940149470975365191")) { if (newMember?.roles.cache.some(r => r.id === "940149470975365191")) {

View file

@ -30,7 +30,7 @@ class MessageCreate extends BaseEvent {
if (message.guild && !message.member) await message.guild.members.fetch(message.author.id); if (message.guild && !message.member) await message.guild.members.fetch(message.author.id);
if (message.guild) { if (message.guild) {
const guildData = await client.findOrCreateGuild({ id: message.guildId }); 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; message.guild.data = data.guildData = guildData;
data.memberData = memberData; data.memberData = memberData;