mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +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
|
||||
*/
|
||||
class Attachment {
|
||||
constructor({ url, filename, ...data }) {
|
||||
this.attachment = url;
|
||||
constructor(data) {
|
||||
this.attachment = data.url;
|
||||
/**
|
||||
* The name of this attachment
|
||||
* @type {string}
|
||||
*/
|
||||
this.name = filename;
|
||||
if (data) this._patch(data);
|
||||
this.name = data.filename;
|
||||
this._patch(data);
|
||||
}
|
||||
|
||||
_patch(data) {
|
||||
|
||||
Reference in New Issue
Block a user