mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
Added createServer
This commit is contained in:
@@ -13,7 +13,7 @@ var Message = (function () {
|
||||
|
||||
this.channel = channel;
|
||||
this.client = client;
|
||||
|
||||
console.log("update", data);
|
||||
this.nonce = data.nonce;
|
||||
this.attachments = data.attachments;
|
||||
this.tts = data.tts;
|
||||
@@ -23,7 +23,9 @@ var Message = (function () {
|
||||
this.id = data.id;
|
||||
|
||||
if (data.edited_timestamp) this.editedTimestamp = Date.parse(data.edited_timestamp);
|
||||
this.author = client.internal.users.add(new User(data.author, client));
|
||||
|
||||
if (data.author instanceof User) this.author = data.author;else this.author = client.internal.users.add(new User(data.author, client));
|
||||
|
||||
this.content = data.content;
|
||||
this.mentions = new Cache();
|
||||
|
||||
@@ -31,7 +33,7 @@ var Message = (function () {
|
||||
// this is .add and not .get because it allows the bot to cache
|
||||
// users from messages from logs who may have left the server and were
|
||||
// not previously cached.
|
||||
_this.mentions.add(client.internal.users.add(new User(mention, client)));
|
||||
if (mention instanceof User) _this.mentions.push(mention);else _this.mentions.add(client.internal.users.add(new User(mention, client)));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user