diff --git a/assets/openapi.json b/assets/openapi.json
index 25833b979..304604826 100644
Binary files a/assets/openapi.json and b/assets/openapi.json differ
diff --git a/assets/schemas.json b/assets/schemas.json
index a7acf2b04..2cf6a939d 100644
Binary files a/assets/schemas.json and b/assets/schemas.json differ
diff --git a/src/schemas/api/messages/Message.ts b/src/schemas/api/messages/Message.ts
index ee2b9a8bc..f99f2b1bf 100644
--- a/src/schemas/api/messages/Message.ts
+++ b/src/schemas/api/messages/Message.ts
@@ -16,7 +16,7 @@
along with this program. If not, see .
*/
-import { Attachment, Sticker } from "@spacebar/util";
+import { Sticker } from "@spacebar/util";
import { Embed, MessageActivity, MessageComponent, PartialUser, Poll, PublicChannel, Snowflake } from "@spacebar/schemas";
import { PublicAttachment } from "./Attachments";
@@ -151,7 +151,7 @@ export interface MessageSnapshot {
edited_timestamp?: Date | null;
mentions: PartialUser[];
mention_roles: Snowflake[];
- attachments?: Attachment[];
+ attachments?: PublicAttachment[];
embeds: Embed[];
type: MessageType;
flags: number;
diff --git a/src/schemas/responses/AccountStandingResponse.ts b/src/schemas/responses/AccountStandingResponse.ts
index 6f29ebef7..c1f603bdf 100644
--- a/src/schemas/responses/AccountStandingResponse.ts
+++ b/src/schemas/responses/AccountStandingResponse.ts
@@ -16,8 +16,7 @@
along with this program. If not, see .
*/
-// TODO: remove dependency on entities...
-import { Attachment } from "@spacebar/util";
+import { PublicAttachment } from "../api/messages/Attachments";
export enum AccountStandingState {
ALL_GOOD = 100,
@@ -114,7 +113,7 @@ export interface FlaggedContent {
type: "message";
id: string;
content: string;
- attachments: Attachment[];
+ attachments: PublicAttachment[];
}
export interface Classification {
diff --git a/src/schemas/responses/GuildMessagesSearchResponse.ts b/src/schemas/responses/GuildMessagesSearchResponse.ts
index 8627b3fc2..e498f8bc0 100644
--- a/src/schemas/responses/GuildMessagesSearchResponse.ts
+++ b/src/schemas/responses/GuildMessagesSearchResponse.ts
@@ -17,8 +17,9 @@
*/
// TODO: remove dependency on entities
-import { Attachment, Role } from "@spacebar/util";
+import { Role } from "@spacebar/util";
import { BaseMessageComponents, Embed, MessageType, Poll, PublicUser } from "@spacebar/schemas";
+import { PublicAttachment } from "../api/messages/Attachments";
export interface GuildMessagesSearchMessage {
id: string;
@@ -26,7 +27,7 @@ export interface GuildMessagesSearchMessage {
content?: string;
channel_id: string;
author: PublicUser;
- attachments: Attachment[];
+ attachments: PublicAttachment[];
embeds: Embed[];
mentions: PublicUser[];
mention_roles: Role[];
diff --git a/src/util/entities/Message.ts b/src/util/entities/Message.ts
index 217f1da00..c2628e2c1 100644
--- a/src/util/entities/Message.ts
+++ b/src/util/entities/Message.ts
@@ -331,7 +331,7 @@ export class Message extends BaseClass {
toSnapshot(): MessageSnapshot {
return {
message: {
- attachments: this.attachments,
+ attachments: this.attachments?.map((x) => x.toJSON()),
components: this.components,
content: this.content!,
edited_timestamp: this.edited_timestamp,