summary refs log tree commit diff
path: root/src/models
diff options
context:
space:
mode:
authorxnacly <matteogropp@gmail.com>2021-02-21 19:09:37 +0100
committerxnacly <matteogropp@gmail.com>2021-02-21 19:09:37 +0100
commitde5009cdad9874d35f0b571f2f2ab9d418363943 (patch)
treed3ac675f68f2f44c832d58e74edfa1328d39948b /src/models
parentfixed typo in Ban.ts (diff)
downloadserver-de5009cdad9874d35f0b571f2f2ab9d418363943.tar.xz
updated InviteModel
Diffstat (limited to 'src/models')
-rw-r--r--src/models/Invite.ts69
1 files changed, 15 insertions, 54 deletions
diff --git a/src/models/Invite.ts b/src/models/Invite.ts

index 61619895..e6cf5cce 100644 --- a/src/models/Invite.ts +++ b/src/models/Invite.ts
@@ -1,4 +1,4 @@ -import { Schema, model, Types, Document } from "mongoose"; +import { Schema, Document, Types } from "mongoose"; import db from "../util/Database"; export interface Invite extends Document { @@ -8,33 +8,14 @@ export interface Invite extends Document { max_uses: number; max_age: number; created_at: number; - guild: { - id: bigint; - name: string; - splash: string; - description: string; - icon: string; - features: Object; - verification_level: number; - }; - channel: { - id: bigint; - name: string; - type: number; - }; - inviter: { - id: bigint; - username: string; - avatar: string; - discriminator: number; - }; - target_user: { - id: bigint; - username: string; - avatar: string; - discriminator: number; - }; - target_user_type: number; + guild_id: bigint; + channel_id: bigint; + inviter_id: bigint; + + //! What the fucking shit is this + target_user_id?: bigint; + target_user_type?: number; + // ! } export const InviteSchema = new Schema({ @@ -44,34 +25,14 @@ export const InviteSchema = new Schema({ max_uses: Number, max_age: Number, created_at: Number, - guild: { - id: Types.Long, - name: String, - splash: String, - description: String, - icon: String, - features: Object, - verification_level: Number, - }, - channel: { - id: Types.Long, - name: String, - type: Number, - }, + guild_id: Types.Long, + channel_id: Types.Long, + inviter_id: Types.Long, - inviter: { - id: Types.Long, - username: String, - avatar: String, - discriminator: Number, - }, - target_user: { - id: Types.Long, - username: String, - avatar: String, - discriminator: Number, - }, + //! What the fucking shit is this + target_user_id: Types.Long, target_user_type: Number, + // ! }); // @ts-ignore