1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
import { Schema, model, Types, Document } from "mongoose";
export interface Invite extends Document {
code: string;
temporary: boolean;
uses: number;
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;
}
export const InviteSchema = new Schema({
code: String,
temporary: Boolean,
uses: Number,
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,
},
inviter: {
id: Types.Long,
username: String,
avatar: String,
discriminator: Number,
},
target_user: {
id: Types.Long,
username: String,
avatar: String,
discriminator: Number,
},
target_user_type: Number,
});
export const InviteModel = model<Invite>("Invite", InviteSchema, "invites");
|