mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 05:04:58 +05:00
oi
This commit is contained in:
parent
741fd8d3d5
commit
4d9ed056a7
4 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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")) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue