mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 12:33:30 +01:00
fix(Attachment): do not destructure data (#8041)
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user