From 084dc0be08555891cad4c2bb984822a62ec5ec9f Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Fri, 20 Jan 2023 18:10:47 +1100 Subject: Add ESLint (#941) * Add eslint, switch to lint-staged for precommit * Fix all ESLint errors * Update GH workflow to check prettier and eslint --- src/util/schemas/MessageCreateSchema.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/util/schemas/MessageCreateSchema.ts') diff --git a/src/util/schemas/MessageCreateSchema.ts b/src/util/schemas/MessageCreateSchema.ts index 1dd5d32c..4ee6e738 100644 --- a/src/util/schemas/MessageCreateSchema.ts +++ b/src/util/schemas/MessageCreateSchema.ts @@ -18,6 +18,11 @@ import { Embed } from "@fosscord/util"; +type Attachment = { + id: string; + filename: string; +}; + export interface MessageCreateSchema { type?: number; content?: string; @@ -41,11 +46,11 @@ export interface MessageCreateSchema { fail_if_not_exists?: boolean; }; payload_json?: string; - file?: any; + file?: { filename: string }; /** TODO: we should create an interface for attachments TODO: OpenWAAO<-->attachment-style metadata conversion **/ - attachments?: any[]; + attachments?: Attachment[]; sticker_ids?: string[]; } -- cgit 1.5.1