mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 13:14:58 +05:00
oi
This commit is contained in:
parent
7174722160
commit
3aca11ebb3
2 changed files with 5 additions and 7 deletions
|
@ -25,7 +25,7 @@ class CommandHandler extends BaseEvent {
|
||||||
const guildData = await client.findOrCreateGuild({ id: interaction.guildId });
|
const guildData = await client.findOrCreateGuild({ id: interaction.guildId });
|
||||||
const memberData = await client.findOrCreateMember({ id: interaction.member.id, guildId: interaction.guildId });
|
const memberData = await client.findOrCreateMember({ id: interaction.member.id, guildId: interaction.guildId });
|
||||||
|
|
||||||
data.guildData = guildData;
|
interaction.guild.data = data.guildData = guildData;
|
||||||
data.memberData = memberData;
|
data.memberData = memberData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,19 +22,17 @@ class MessageCreate extends BaseEvent {
|
||||||
const data = {};
|
const data = {};
|
||||||
|
|
||||||
if (message.author.bot) return;
|
if (message.author.bot) return;
|
||||||
|
if (message.content.match(new RegExp(`^<@!?${client.user.id}>( |)$`))) return message.replyT("misc:HELLO_SERVER", null, { mention: true });
|
||||||
|
|
||||||
const userData = await client.findOrCreateUser({ id: message.author.id });
|
const userData = await client.findOrCreateUser({ id: message.author.id });
|
||||||
data.userData = userData;
|
data.userData = userData;
|
||||||
|
|
||||||
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 guild = await client.findOrCreateGuild({ id: message.guild.id });
|
const guildData = await client.findOrCreateGuild({ id: message.guild.id });
|
||||||
data.guildData = guild;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (message.content.match(new RegExp(`^<@!?${client.user.id}>( |)$`))) return message.replyT("misc:HELLO_SERVER", null, { mention: true });
|
|
||||||
if (message.guild) {
|
|
||||||
const memberData = await client.findOrCreateMember({ id: message.author.id, guildId: message.guild.id });
|
const memberData = await client.findOrCreateMember({ id: message.author.id, guildId: message.guild.id });
|
||||||
|
|
||||||
|
message.guild.data = data.guildData = guildData;
|
||||||
data.memberData = memberData;
|
data.memberData = memberData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue