docs/typings(MessageAttachment): mark spoiler as readonly, order spoiler in typings (#3714)

This commit is contained in:
SpaceEEC
2020-02-24 13:03:02 +01:00
committed by GitHub
parent e57ef25082
commit ccb83a71ee
2 changed files with 2 additions and 1 deletions

View File

@@ -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_');

2
typings/index.d.ts vendored
View File

@@ -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;