Attachment -> PublicAttachment in schemas

This commit is contained in:
Rory&
2026-04-18 01:24:35 +02:00
parent 7c609bfe43
commit f5c5cc7b9d
6 changed files with 8 additions and 8 deletions
Binary file not shown.
Binary file not shown.
+2 -2
View File
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
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;
@@ -16,8 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
// 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 {
@@ -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[];
+1 -1
View File
@@ -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,