⚡ use mongoose autopopulate

This commit is contained in:
Flam3rboy
2021-04-07 20:25:37 +02:00
parent 482088b91b
commit 2a95275502
8 changed files with 63 additions and 59 deletions
+1
View File
@@ -5,6 +5,7 @@ export async function emitEvent(payload: Omit<Event, "created_at">) {
created_at: new Date(), // in seconds
...payload,
};
// TODO: bigint isn't working
return await new EventModel(obj).save();
}
+1
View File
@@ -75,6 +75,7 @@ export async function addMember(user_id: string, guild_id: string, cache?: { gui
},
guild_id: guild_id,
} as GuildMemberAddEvent),
emitEvent({
event: "GUILD_CREATE",
data: guild,