component v2 1
This commit is contained in:
@@ -49,6 +49,7 @@ class BaseMessageComponent {
|
|||||||
* The type of this component
|
* The type of this component
|
||||||
* @type {?MessageComponentType}
|
* @type {?MessageComponentType}
|
||||||
*/
|
*/
|
||||||
|
this.rawData = data;
|
||||||
this.type = 'type' in data ? BaseMessageComponent.resolveType(data.type) : null;
|
this.type = 'type' in data ? BaseMessageComponent.resolveType(data.type) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ MessageFlags.FLAGS = {
|
|||||||
SUPPRESS_NOTIFICATIONS: 1 << 12,
|
SUPPRESS_NOTIFICATIONS: 1 << 12,
|
||||||
IS_VOICE_MESSAGE: 1 << 13,
|
IS_VOICE_MESSAGE: 1 << 13,
|
||||||
HAS_SNAPSHOT: 1 << 14,
|
HAS_SNAPSHOT: 1 << 14,
|
||||||
IS_UIKIT_COMPONENTS: 1 << 15,
|
IS_COMPONENTS_V2: 1 << 15,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = MessageFlags;
|
module.exports = MessageFlags;
|
||||||
|
|||||||
7
typings/enums.d.ts
vendored
7
typings/enums.d.ts
vendored
@@ -226,6 +226,13 @@ export const enum MessageComponentTypes {
|
|||||||
ROLE_SELECT = 6,
|
ROLE_SELECT = 6,
|
||||||
MENTIONABLE_SELECT = 7,
|
MENTIONABLE_SELECT = 7,
|
||||||
CHANNEL_SELECT = 8,
|
CHANNEL_SELECT = 8,
|
||||||
|
SELECTION = 9,
|
||||||
|
TEXT_DISPLAY = 10,
|
||||||
|
THUMBNAIL = 11,
|
||||||
|
MEDIA_GALLERY = 12,
|
||||||
|
FILE = 13,
|
||||||
|
SEPARATOR = 14,
|
||||||
|
CONTAINER = 17,
|
||||||
}
|
}
|
||||||
|
|
||||||
export const enum SelectMenuComponentTypes {
|
export const enum SelectMenuComponentTypes {
|
||||||
|
|||||||
Reference in New Issue
Block a user