From dce40279280ddbc3b961ab83a9cc6f0fbec7e05c Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Mon, 8 Mar 2021 18:41:31 +0100 Subject: :sparkles: changed number to date type --- src/models/Message.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/models/Message.ts') 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", MessageSchema, "messages"); +export const MessageModel = db.model("Message", MessageSchema, "messages"); -- cgit 1.5.1