Merge pull request #1449 from MathMan05/inviteFix

This commit is contained in:
Cyber authored and GitHub committed 2025-12-22 20:57:08 +01:00
commit 387b176f24
2 files changed
+7 -1

No files matched your search

+6
View File
@@ -104,6 +104,12 @@ export class Invite extends BaseClassWithoutId {
if (this.max_uses !== 0 && this.uses >= this.max_uses) return true;
return false;
}
toPublicJSON() {
return {
...this,
inviter: this.inviter.toPublicUser(),
};
}
static async joinGuild(user_id: string, code: string) {
const invite = await Invite.findOneOrFail({ where: { code } });