types: allow message cached props to be narrowed (#6838)

Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
This commit is contained in:
Suneet Tipirneni
2021-10-24 15:31:42 -04:00
committed by GitHub
parent 579569ae18
commit c3948f8253
3 changed files with 89 additions and 24 deletions

View File

@@ -889,6 +889,14 @@ class Message extends Base {
return equal;
}
/**
* Whether this message is from a guild.
* @returns {boolean}
*/
inGuild() {
return Boolean(this.guildId);
}
/**
* When concatenated with a string, this automatically concatenates the message's content instead of the object.
* @returns {string}