mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 05:04: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 memberData = await client.findOrCreateMember({ id: interaction.member.id, guildId: interaction.guildId });
|
||||
|
||||
data.guildData = guildData;
|
||||
interaction.guild.data = data.guildData = guildData;
|
||||
data.memberData = memberData;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,19 +22,17 @@ class MessageCreate extends BaseEvent {
|
|||
const data = {};
|
||||
|
||||
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 });
|
||||
data.userData = userData;
|
||||
|
||||
if (message.guild && !message.member) await message.guild.members.fetch(message.author.id);
|
||||
if (message.guild) {
|
||||
const guild = 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 guildData = await client.findOrCreateGuild({ id: 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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue