mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
Co-authored-by: izexi <43889168+izexi@users.noreply.github.com> Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com> Co-authored-by: Advaith <advaithj1@gmail.com> Co-authored-by: Shiaupiau <stu43005@gmail.com> Co-authored-by: monbrey <rsm999@uowmail.edu.au> Co-authored-by: Tiemen <ThaTiemsz@users.noreply.github.com> Co-authored-by: Carter <carter@elhnet.net>
47 lines
981 B
JavaScript
47 lines
981 B
JavaScript
'use strict';
|
|
|
|
const BitField = require('./BitField');
|
|
|
|
/**
|
|
* Data structure that makes it easy to interact with a {@link Message#flags} bitfield.
|
|
* @extends {BitField}
|
|
*/
|
|
class MessageFlags extends BitField {}
|
|
|
|
/**
|
|
* @name MessageFlags
|
|
* @kind constructor
|
|
* @memberof MessageFlags
|
|
* @param {BitFieldResolvable} [bits=0] Bit(s) to read from
|
|
*/
|
|
|
|
/**
|
|
* Bitfield of the packed bits
|
|
* @type {number}
|
|
* @name MessageFlags#bitfield
|
|
*/
|
|
|
|
/**
|
|
* Numeric message flags. All available properties:
|
|
* * `CROSSPOSTED`
|
|
* * `IS_CROSSPOST`
|
|
* * `SUPPRESS_EMBEDS`
|
|
* * `SOURCE_MESSAGE_DELETED`
|
|
* * `URGENT`
|
|
* * `EPHEMERAL`
|
|
* * `LOADING`
|
|
* @type {Object}
|
|
* @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-flags}
|
|
*/
|
|
MessageFlags.FLAGS = {
|
|
CROSSPOSTED: 1 << 0,
|
|
IS_CROSSPOST: 1 << 1,
|
|
SUPPRESS_EMBEDS: 1 << 2,
|
|
SOURCE_MESSAGE_DELETED: 1 << 3,
|
|
URGENT: 1 << 4,
|
|
EPHEMERAL: 1 << 6,
|
|
LOADING: 1 << 7,
|
|
};
|
|
|
|
module.exports = MessageFlags;
|