mirror of
https://github.com/danbulant/discord.js
synced 2026-05-26 13:32:04 +00:00
Made Message.guild a getter
This commit is contained in:
parent
8603759b5e
commit
d8542b3365
2 changed files with 9 additions and 7 deletions
File diff suppressed because one or more lines are too long
|
|
@ -21,12 +21,6 @@ class Message {
|
|||
*/
|
||||
this.channel = channel;
|
||||
|
||||
/**
|
||||
* If the message was sent in a guild, this will be the guild the message was sent in
|
||||
* @type {?Guild}
|
||||
*/
|
||||
this.guild = channel.guild || null;
|
||||
|
||||
if (data) this.setup(data);
|
||||
}
|
||||
|
||||
|
|
@ -206,6 +200,14 @@ class Message {
|
|||
return new Date(this._editedTimestamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* The guild the message was sent in (if in a guild channel)
|
||||
* @type {?Guild}
|
||||
*/
|
||||
get guild() {
|
||||
return this.channel.guild || null;
|
||||
}
|
||||
|
||||
/**
|
||||
* The message contents with all mentions replaced by the equivalent text.
|
||||
* @type {string}
|
||||
|
|
|
|||
Loading…
Reference in a new issue