From ccb83a71ee5b85abaf6e90bc5ca3987c708aa57f Mon Sep 17 00:00:00 2001 From: SpaceEEC Date: Mon, 24 Feb 2020 13:03:02 +0100 Subject: [PATCH] docs/typings(MessageAttachment): mark spoiler as readonly, order spoiler in typings (#3714) --- src/structures/MessageAttachment.js | 1 + typings/index.d.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/structures/MessageAttachment.js b/src/structures/MessageAttachment.js index 1af5d1ed8..f5fb723b2 100644 --- a/src/structures/MessageAttachment.js +++ b/src/structures/MessageAttachment.js @@ -84,6 +84,7 @@ class MessageAttachment { /** * Whether or not this attachment has been marked as a spoiler * @type {boolean} + * @readonly */ get spoiler() { return Util.basename(this.url).startsWith('SPOILER_'); diff --git a/typings/index.d.ts b/typings/index.d.ts index 44851f008..69fb66d53 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1027,9 +1027,9 @@ declare module 'discord.js' { public name?: string; public proxyURL: string; public size: number; + public readonly spoiler: boolean; public url: string; public width: number | null; - public readonly spoiler: boolean; public setFile(attachment: BufferResolvable | Stream, name?: string): this; public setName(name: string): this; public toJSON(): object;