2021-02-13 14:15:59 +01:00
|
|
|
/// <reference path="../util/MongoBigInt.d.ts" />
|
2021-04-06 18:01:49 +02:00
|
|
|
import { Schema, Document } from "mongoose";
|
2021-03-08 18:41:31 +01:00
|
|
|
export interface Message {
|
2021-04-06 18:01:49 +02:00
|
|
|
id: string;
|
|
|
|
channel_id: string;
|
|
|
|
guild_id?: string;
|
|
|
|
author_id?: string;
|
|
|
|
webhook_id?: string;
|
|
|
|
application_id?: string;
|
2021-03-27 21:51:45 +01:00
|
|
|
content?: string;
|
2021-03-27 21:25:49 +01:00
|
|
|
timestamp: Date;
|
2021-03-27 21:51:45 +01:00
|
|
|
edited_timestamp?: Date;
|
|
|
|
tts?: boolean;
|
|
|
|
mention_everyone?: boolean;
|
2021-04-06 18:01:49 +02:00
|
|
|
mention_user_ids: string[];
|
|
|
|
mention_role_ids: string[];
|
|
|
|
mention_channels_ids: string[];
|
2021-02-11 20:44:26 +01:00
|
|
|
attachments: Attachment[];
|
|
|
|
embeds: Embed[];
|
2021-03-27 21:51:45 +01:00
|
|
|
reactions: Reaction[];
|
2021-02-11 20:44:26 +01:00
|
|
|
nonce?: string | number;
|
2021-03-27 21:51:45 +01:00
|
|
|
pinned?: boolean;
|
2021-02-11 20:44:26 +01:00
|
|
|
type: MessageType;
|
|
|
|
activity?: {
|
|
|
|
type: number;
|
|
|
|
party_id: string;
|
2021-02-13 14:15:59 +01:00
|
|
|
};
|
2021-02-11 20:44:26 +01:00
|
|
|
flags?: bigint;
|
|
|
|
stickers?: [];
|
|
|
|
message_reference?: {
|
2021-04-06 18:01:49 +02:00
|
|
|
message_id: string;
|
|
|
|
channel_id?: string;
|
|
|
|
guild_id?: string;
|
2021-02-11 20:44:26 +01:00
|
|
|
};
|
|
|
|
}
|
2021-03-08 18:41:31 +01:00
|
|
|
export interface MessageDocument extends Document, Message {
|
2021-04-06 18:01:49 +02:00
|
|
|
id: string;
|
2021-03-08 18:41:31 +01:00
|
|
|
}
|
2021-02-11 20:44:26 +01:00
|
|
|
export declare enum MessageType {
|
|
|
|
DEFAULT = 0,
|
|
|
|
RECIPIENT_ADD = 1,
|
|
|
|
RECIPIENT_REMOVE = 2,
|
|
|
|
CALL = 3,
|
|
|
|
CHANNEL_NAME_CHANGE = 4,
|
|
|
|
CHANNEL_ICON_CHANGE = 5,
|
|
|
|
CHANNEL_PINNED_MESSAGE = 6,
|
|
|
|
GUILD_MEMBER_JOIN = 7,
|
|
|
|
USER_PREMIUM_GUILD_SUBSCRIPTION = 8,
|
|
|
|
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1 = 9,
|
|
|
|
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2 = 10,
|
|
|
|
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3 = 11,
|
|
|
|
CHANNEL_FOLLOW_ADD = 12,
|
|
|
|
GUILD_DISCOVERY_DISQUALIFIED = 14,
|
|
|
|
GUILD_DISCOVERY_REQUALIFIED = 15,
|
|
|
|
REPLY = 19,
|
|
|
|
APPLICATION_COMMAND = 20
|
|
|
|
}
|
|
|
|
export interface Attachment {
|
2021-04-06 18:01:49 +02:00
|
|
|
id: string;
|
2021-02-11 20:44:26 +01:00
|
|
|
filename: string;
|
|
|
|
size: number;
|
|
|
|
url: string;
|
|
|
|
proxy_url: string;
|
|
|
|
height: number;
|
|
|
|
width: number;
|
|
|
|
}
|
|
|
|
export interface Embed {
|
|
|
|
title?: string;
|
|
|
|
type?: string;
|
|
|
|
description?: string;
|
|
|
|
url?: string;
|
2021-03-27 21:25:49 +01:00
|
|
|
timestamp?: Date;
|
2021-02-11 20:44:26 +01:00
|
|
|
color?: number;
|
|
|
|
footer?: {
|
|
|
|
text: string;
|
|
|
|
icon_url?: string;
|
|
|
|
proxy_icon_url?: string;
|
|
|
|
};
|
|
|
|
image?: EmbedImage;
|
|
|
|
thumbnail?: EmbedImage;
|
|
|
|
video?: EmbedImage;
|
|
|
|
provider?: {
|
|
|
|
name?: string;
|
|
|
|
url?: string;
|
|
|
|
};
|
|
|
|
author?: {
|
|
|
|
name?: string;
|
|
|
|
url?: string;
|
|
|
|
icon_url?: string;
|
|
|
|
proxy_icon_url?: string;
|
|
|
|
};
|
|
|
|
fields?: {
|
|
|
|
name: string;
|
|
|
|
value: string;
|
|
|
|
inline?: boolean;
|
|
|
|
}[];
|
|
|
|
}
|
|
|
|
export interface EmbedImage {
|
|
|
|
url?: string;
|
|
|
|
proxy_url?: string;
|
|
|
|
height?: number;
|
|
|
|
width?: number;
|
|
|
|
}
|
|
|
|
export interface Reaction {
|
|
|
|
count: number;
|
|
|
|
emoji: PartialEmoji;
|
|
|
|
}
|
|
|
|
export interface PartialEmoji {
|
2021-04-06 18:01:49 +02:00
|
|
|
id?: string;
|
2021-02-11 20:44:26 +01:00
|
|
|
name: string;
|
|
|
|
animated?: boolean;
|
|
|
|
}
|
|
|
|
export interface AllowedMentions {
|
|
|
|
parse?: ("users" | "roles" | "everyone")[];
|
2021-04-06 18:01:49 +02:00
|
|
|
roles?: string[];
|
|
|
|
users?: string[];
|
2021-02-11 20:44:26 +01:00
|
|
|
replied_user?: boolean;
|
|
|
|
}
|
2021-03-08 18:41:31 +01:00
|
|
|
export declare const Attachment: {
|
2021-04-06 18:01:49 +02:00
|
|
|
id: StringConstructor;
|
2021-03-08 18:41:31 +01:00
|
|
|
filename: StringConstructor;
|
|
|
|
size: NumberConstructor;
|
|
|
|
url: StringConstructor;
|
|
|
|
proxy_url: StringConstructor;
|
|
|
|
height: NumberConstructor;
|
|
|
|
width: NumberConstructor;
|
|
|
|
};
|
|
|
|
export declare const EmbedImage: {
|
|
|
|
url: StringConstructor;
|
|
|
|
proxy_url: StringConstructor;
|
|
|
|
height: NumberConstructor;
|
|
|
|
width: NumberConstructor;
|
|
|
|
};
|
|
|
|
export declare const Embed: {
|
|
|
|
title: StringConstructor;
|
|
|
|
type: StringConstructor;
|
|
|
|
description: StringConstructor;
|
|
|
|
url: StringConstructor;
|
2021-03-27 21:25:49 +01:00
|
|
|
timestamp: DateConstructor;
|
2021-03-08 18:41:31 +01:00
|
|
|
color: NumberConstructor;
|
|
|
|
footer: {
|
|
|
|
text: StringConstructor;
|
|
|
|
icon_url: StringConstructor;
|
|
|
|
proxy_icon_url: StringConstructor;
|
|
|
|
};
|
|
|
|
image: {
|
|
|
|
url: StringConstructor;
|
|
|
|
proxy_url: StringConstructor;
|
|
|
|
height: NumberConstructor;
|
|
|
|
width: NumberConstructor;
|
|
|
|
};
|
|
|
|
thumbnail: {
|
|
|
|
url: StringConstructor;
|
|
|
|
proxy_url: StringConstructor;
|
|
|
|
height: NumberConstructor;
|
|
|
|
width: NumberConstructor;
|
|
|
|
};
|
|
|
|
video: {
|
|
|
|
url: StringConstructor;
|
|
|
|
proxy_url: StringConstructor;
|
|
|
|
height: NumberConstructor;
|
|
|
|
width: NumberConstructor;
|
|
|
|
};
|
|
|
|
provider: {
|
|
|
|
name: StringConstructor;
|
|
|
|
url: StringConstructor;
|
|
|
|
};
|
|
|
|
author: {
|
|
|
|
name: StringConstructor;
|
|
|
|
url: StringConstructor;
|
|
|
|
icon_url: StringConstructor;
|
|
|
|
proxy_icon_url: StringConstructor;
|
|
|
|
};
|
|
|
|
fields: {
|
|
|
|
name: StringConstructor;
|
|
|
|
value: StringConstructor;
|
|
|
|
inline: BooleanConstructor;
|
|
|
|
}[];
|
|
|
|
};
|
2021-02-13 14:15:59 +01:00
|
|
|
export declare const MessageSchema: Schema<Document<any>, import("mongoose").Model<Document<any>>, undefined>;
|
2021-03-08 18:41:31 +01:00
|
|
|
export declare const MessageModel: import("mongoose").Model<MessageDocument>;
|