mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-18 03:29:14 +00:00
31
src/structures/MessageMedia.js
Normal file
31
src/structures/MessageMedia.js
Normal file
@@ -0,0 +1,31 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Media attached to a message
|
||||
* @param {string} mimetype MIME type of the attachment
|
||||
* @param {string} data Base64-encoded data of the file
|
||||
* @param {?string} filename Document file name
|
||||
*/
|
||||
class MessageMedia {
|
||||
constructor(mimetype, data, filename) {
|
||||
/**
|
||||
* MIME type of the attachment
|
||||
* @type {string}
|
||||
*/
|
||||
this.mimetype = mimetype;
|
||||
|
||||
/**
|
||||
* Base64 encoded data that represents the file
|
||||
* @type {string}
|
||||
*/
|
||||
this.data = data;
|
||||
|
||||
/**
|
||||
* Name of the file (for documents)
|
||||
* @type {?string}
|
||||
*/
|
||||
this.filename = filename;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = MessageMedia;
|
||||
Reference in New Issue
Block a user