summary refs log tree commit diff
path: root/src/models/Message.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-03-08 18:41:31 +0100
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-03-08 18:41:31 +0100
commitdce40279280ddbc3b961ab83a9cc6f0fbec7e05c (patch)
treed094ec4bdfc0c041ad8cb91221170df9084ae6b3 /src/models/Message.ts
parent:sparkles: AuditLog (diff)
downloadserver-dce40279280ddbc3b961ab83a9cc6f0fbec7e05c.tar.xz
:sparkles: changed number to date type
Diffstat (limited to 'src/models/Message.ts')
-rw-r--r--src/models/Message.ts12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/models/Message.ts b/src/models/Message.ts

index 43517313..88291f9f 100644 --- a/src/models/Message.ts +++ b/src/models/Message.ts
@@ -4,7 +4,7 @@ import { UserModel } from "./User"; import { MemberModel } from "./Member"; import { RoleModel } from "./Role"; -export interface Message extends Document { +export interface Message { id: bigint; channel_id: bigint; guild_id?: bigint; @@ -38,6 +38,10 @@ export interface Message extends Document { }; } +export interface MessageDocument extends Document, Message { + id: bigint; +} + export enum MessageType { DEFAULT = 0, RECIPIENT_ADD = 1, @@ -126,7 +130,7 @@ export interface AllowedMentions { replied_user?: boolean; } -const Attachment = { +export const Attachment = { id: Types.Long, // attachment id filename: String, // name of file attached size: Number, // size of file in bytes @@ -136,7 +140,7 @@ const Attachment = { width: Number, // width of file (if image) }; -const EmbedImage = { +export const EmbedImage = { url: String, proxy_url: String, height: Number, @@ -264,4 +268,4 @@ MessageSchema.virtual("mention_channels", { // }); // @ts-ignore -export const MessageModel = db.model<Message>("Message", MessageSchema, "messages"); +export const MessageModel = db.model<MessageDocument>("Message", MessageSchema, "messages");