chore: Miscellaneous backports

#9769 djs
This commit is contained in:
Elysia
2023-11-13 20:23:53 +07:00
parent d9e1b82fd2
commit fe6a30e074
12 changed files with 219 additions and 38 deletions

View File

@@ -1,5 +1,6 @@
'use strict';
const AttachmentFlags = require('../util/AttachmentFlags');
const Util = require('../util/Util');
/**
@@ -169,6 +170,16 @@ class MessageAttachment {
} else {
this.waveform ??= null;
}
if ('flags' in data) {
/**
* The flags of this attachment
* @type {Readonly<AttachmentFlags>}
*/
this.flags = new AttachmentFlags(data.flags).freeze();
} else {
this.flags ??= new AttachmentFlags().freeze();
}
}
/**