mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
Add message.system
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -140,6 +140,15 @@ class Message {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)
|
||||
* @type {Boolean}
|
||||
*/
|
||||
this.system = false;
|
||||
if (data.type === 6) {
|
||||
this.system = true;
|
||||
}
|
||||
}
|
||||
|
||||
patch(data) {
|
||||
@@ -170,6 +179,12 @@ class Message {
|
||||
if (data.embeds) {
|
||||
this.embeds = data.embeds.map(e => new Embed(this, e));
|
||||
}
|
||||
if (data.type > -1) {
|
||||
this.system = false;
|
||||
if (data.type === 6) {
|
||||
this.system = true;
|
||||
}
|
||||
}
|
||||
if (data.attachments) {
|
||||
this.attachments = new Collection();
|
||||
for (const attachment of data.attachments) {
|
||||
|
||||
Reference in New Issue
Block a user