diff --git a/index.d.ts b/index.d.ts index dfeb93f2f..10920e589 100644 --- a/index.d.ts +++ b/index.d.ts @@ -273,6 +273,13 @@ declare namespace Eris { INTEGRATION_UPDATE: 81; INTEGRATION_DELETE: 82; }; + MessageFlags: { + CROSSPOSTED: 0; + IS_CROSSPOST: 2; + SUPPRESS_EMBEDS: 4; + SOURCE_MESSAGE_DELETED: 8; + URGENT: 16; + }; MessageTypes: { DEFAULT: 0; RECIPIENT_ADD: 1; @@ -1615,6 +1622,7 @@ declare namespace Eris { defaultAvatarURL: string; avatarURL: string; staticAvatarURL: string; + system: boolean; constructor(data: BaseData, client: Client); dynamicAvatarURL(format?: string, size?: number): string; getDMChannel(): Promise; diff --git a/lib/Constants.js b/lib/Constants.js index a480ed2ca..16417fb2b 100644 --- a/lib/Constants.js +++ b/lib/Constants.js @@ -170,7 +170,9 @@ module.exports.AuditLogActions = { module.exports.MessageFlags = { CROSSPOSTED: 1 << 0, IS_CROSSPOST: 1 << 1, - SUPPRESS_EMBEDS: 1 << 2 + SUPPRESS_EMBEDS: 1 << 2, + SOURCE_MESSAGE_DELETED: 1 << 3, + URGENT: 1 << 4 }; module.exports.MessageTypes = { diff --git a/lib/structures/User.js b/lib/structures/User.js index a6042baff..40450694b 100644 --- a/lib/structures/User.js +++ b/lib/structures/User.js @@ -18,6 +18,7 @@ const {ImageSizeBoundaries, ImageFormats} = require("../Constants"); * @prop {String} defaultAvatarURL The URL of the user's default avatar * @prop {String} avatarURL The URL of the user's avatar which can be either a JPG or GIF * @prop {String} staticAvatarURL The URL of the user's avatar (always a JPG) +* @prop {Boolean} system Whether the user is an official Discord system user (e.g. urgent messages) */ class User extends Base { constructor(data, client) { @@ -27,6 +28,7 @@ class User extends Base { } this._client = client; this.bot = !!data.bot; + this.system = !!data.system; this.update(data); }