Files
discord.js-selfbot/src/structures/UnfurledMediaItem.js

27 lines
503 B
JavaScript
Raw Normal View History

2025-06-23 22:04:53 +07:00
'use strict';
class UnfurledMediaItem {
2025-06-29 11:01:41 +07:00
/**
2025-06-29 12:56:55 +07:00
* @property {string} [url] Supports arbitrary urls and `attachment://<filename>` references
*/
2025-06-30 21:53:29 +07:00
/**
* @param {UnfurledMediaItem | APIUnfurledMediaItem} [data={}]
*/
2025-06-23 22:04:53 +07:00
constructor(data = {}) {
2025-06-29 11:01:41 +07:00
/**
* @type {string}
*/
2025-06-23 22:04:53 +07:00
this.url = data.url ?? null;
}
2025-06-29 11:01:41 +07:00
/**
*
* @returns {APIUnfurledMediaItem}
*/
2025-06-23 22:04:53 +07:00
toJSON() {
return {
url: this.url,
};
}
}
module.exports = UnfurledMediaItem;