mirror of
https://github.com/spacebarchat/server.git
synced 2026-08-29 09:49:13 +00:00
Fix attachments
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2026 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export interface PublicAttachment {
|
||||
filename: string; // name of file attached
|
||||
size: number; // size of file in bytes
|
||||
height?: number; // height of file (if image)
|
||||
width?: number; // width of file (if image)
|
||||
content_type?: string;
|
||||
url: string;
|
||||
proxy_url: string;
|
||||
}
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
import { Attachment, Sticker } from "@spacebar/util";
|
||||
import { Embed, MessageActivity, MessageComponent, PartialUser, Poll, PublicChannel, Snowflake } from "@spacebar/schemas";
|
||||
import { PublicAttachment } from "./Attachments";
|
||||
|
||||
export enum MessageType {
|
||||
DEFAULT = 0,
|
||||
@@ -174,7 +175,7 @@ export interface PublicMessage {
|
||||
mentions: PartialUser[];
|
||||
mention_roles: Snowflake[];
|
||||
mention_channels?: PublicChannel[]; // TODO: PartialPublicChannel
|
||||
attachments: Attachment[];
|
||||
attachments: PublicAttachment[];
|
||||
embeds: Embed[];
|
||||
reactions?: Reaction[];
|
||||
nonce?: number | string;
|
||||
@@ -237,4 +238,4 @@ export interface MessageReference {
|
||||
guild_id?: string;
|
||||
fail_if_not_exists?: boolean;
|
||||
type?: number;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user