mirror of
https://github.com/danbulant/discord.js
synced 2026-07-07 20:20:55 +00:00
Add server property to the Message class
Extremely simple change, but I (and others) would probably find it a nice shortcut.
This commit is contained in:
parent
79ee493a39
commit
d42cbd1c14
3 changed files with 8 additions and 1 deletions
|
|
@ -15,7 +15,12 @@ Attributes
|
||||||
channel
|
channel
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
|
||||||
The channel the message sent in, either a TextChannel_ or PMChannel_.
|
The channel the message was sent in, either a TextChannel_ or PMChannel_.
|
||||||
|
|
||||||
|
server
|
||||||
|
~~~~~~~
|
||||||
|
|
||||||
|
The Server_ the message was sent in. Will be null if the message was sent in a PMChannel_.
|
||||||
|
|
||||||
client
|
client
|
||||||
~~~~~~
|
~~~~~~
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ var Message = (function (_Equality) {
|
||||||
|
|
||||||
_Equality.call(this);
|
_Equality.call(this);
|
||||||
this.channel = channel;
|
this.channel = channel;
|
||||||
|
this.server = channel.server;
|
||||||
this.client = client;
|
this.client = client;
|
||||||
this.nonce = data.nonce;
|
this.nonce = data.nonce;
|
||||||
this.attachments = data.attachments;
|
this.attachments = data.attachments;
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ export default class Message extends Equality{
|
||||||
constructor(data, channel, client) {
|
constructor(data, channel, client) {
|
||||||
super();
|
super();
|
||||||
this.channel = channel;
|
this.channel = channel;
|
||||||
|
this.server = channel.server;
|
||||||
this.client = client;
|
this.client = client;
|
||||||
this.nonce = data.nonce;
|
this.nonce = data.nonce;
|
||||||
this.attachments = data.attachments;
|
this.attachments = data.attachments;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue