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-04-06 18:01:49 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-04-06 18:01:49 +0200
commit7685e19835afdf0b403a676c16ada663ddcbc29d (patch)
treec20eba204fa1164fa9caf9c988aa41c721f57cdd /src/models/Message.ts
parent:bug: fix User Model guilds (diff)
downloadserver-7685e19835afdf0b403a676c16ada663ddcbc29d.tar.xz
:art: Convert id bigint to string
Diffstat (limited to 'src/models/Message.ts')
-rw-r--r--src/models/Message.ts62
1 files changed, 31 insertions, 31 deletions
diff --git a/src/models/Message.ts b/src/models/Message.ts

index e80ec1f8..4adf8024 100644 --- a/src/models/Message.ts +++ b/src/models/Message.ts
@@ -5,20 +5,20 @@ import { MemberModel } from "./Member"; import { RoleModel } from "./Role"; export interface Message { - id: bigint; - channel_id: bigint; - guild_id?: bigint; - author_id?: bigint; - webhook_id?: bigint; - application_id?: bigint; + id: string; + channel_id: string; + guild_id?: string; + author_id?: string; + webhook_id?: string; + application_id?: string; content?: string; timestamp: Date; edited_timestamp?: Date; tts?: boolean; mention_everyone?: boolean; - mention_user_ids: bigint[]; - mention_role_ids: bigint[]; - mention_channels_ids: bigint[]; + mention_user_ids: string[]; + mention_role_ids: string[]; + mention_channels_ids: string[]; attachments: Attachment[]; embeds: Embed[]; reactions: Reaction[]; @@ -32,14 +32,14 @@ export interface Message { flags?: bigint; stickers?: []; message_reference?: { - message_id: bigint; - channel_id?: bigint; - guild_id?: bigint; + message_id: string; + channel_id?: string; + guild_id?: string; }; } export interface MessageDocument extends Document, Message { - id: bigint; + id: string; } export enum MessageType { @@ -63,7 +63,7 @@ export enum MessageType { } export interface Attachment { - id: bigint; // attachment id + id: string; // attachment id filename: string; // name of file attached size: number; // size of file in bytes url: string; // source url of file @@ -118,20 +118,20 @@ export interface Reaction { } export interface PartialEmoji { - id?: bigint; + id?: string; name: string; animated?: boolean; } export interface AllowedMentions { parse?: ("users" | "roles" | "everyone")[]; - roles?: bigint[]; - users?: bigint[]; + roles?: string[]; + users?: string[]; replied_user?: boolean; } export const Attachment = { - id: Types.Long, // attachment id + id: String, // attachment id filename: String, // name of file attached size: Number, // size of file in bytes url: String, // source url of file @@ -150,7 +150,7 @@ export const EmbedImage = { const Reaction = { count: Number, emoji: { - id: Types.Long, + id: String, name: String, animated: Boolean, }, @@ -191,20 +191,20 @@ export const Embed = { }; export const MessageSchema = new Schema({ - id: Types.Long, - channel_id: Types.Long, - author_id: Types.Long, - webhook_id: Types.Long, - guild_id: Types.Long, - application_id: Types.Long, + id: String, + channel_id: String, + author_id: String, + webhook_id: String, + guild_id: String, + application_id: String, content: String, timestamp: Date, edited_timestamp: Date, tts: Boolean, mention_everyone: Boolean, - mention_user_ids: [Types.Long], - mention_role_ids: [Types.Long], - mention_channel_ids: [Types.Long], + mention_user_ids: [String], + mention_role_ids: [String], + mention_channel_ids: [String], attachments: [Attachment], embeds: [Embed], reactions: [Reaction], @@ -218,9 +218,9 @@ export const MessageSchema = new Schema({ flags: Types.Long, stickers: [], message_reference: { - message_id: Types.Long, - channel_id: Types.Long, - guild_id: Types.Long, + message_id: String, + channel_id: String, + guild_id: String, }, });