fix(message) retrieve message method

This commit is contained in:
gh0sTedBuddy
2024-04-08 01:18:15 +01:00
parent 3b2d899508
commit ad777b2ec2

View File

@@ -17,7 +17,7 @@ export default class Message {
this.#message = this.#data.message;
} catch(err) {
this.#data = undefined;
this.#message = undefined;
this.#message = rawText;
}
}
@@ -40,4 +40,12 @@ export default class Message {
get(key) {
return this.#data[key];
}
/**
* Retrieves the text content.
* @returns {string} - the text content of the socket message;
*/
text() {
return this.#data.message || '';
}
}