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;