fix(Attachment): do not destructure data (#8041)

This commit is contained in:
Synbulat Biishev
2022-06-08 16:30:06 +05:00
committed by GitHub
parent 65cb36166f
commit 1afae909d7

View File

@@ -13,14 +13,14 @@ const Util = require('../util/Util');
* Represents an attachment * Represents an attachment
*/ */
class Attachment { class Attachment {
constructor({ url, filename, ...data }) { constructor(data) {
this.attachment = url; this.attachment = data.url;
/** /**
* The name of this attachment * The name of this attachment
* @type {string} * @type {string}
*/ */
this.name = filename; this.name = data.filename;
if (data) this._patch(data); this._patch(data);
} }
_patch(data) { _patch(data) {