diff options
Diffstat (limited to 'dist/classes/SentDataMessage.js')
-rw-r--r-- | dist/classes/SentDataMessage.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/dist/classes/SentDataMessage.js b/dist/classes/SentDataMessage.js index 7f763a9..076f1f9 100644 --- a/dist/classes/SentDataMessage.js +++ b/dist/classes/SentDataMessage.js @@ -4,12 +4,28 @@ exports.SentDataMessage = void 0; const Group_1 = require("./Group"); const SentMessage_1 = require("./SentMessage"); const CLIDispatcher_1 = require("./CLIDispatcher"); +/** + * A text message sent to Signal + */ class SentDataMessage extends SentMessage_1.SentMessage { + /** + * @param time - The timestamp at which the message was sent + * @param channel - The channel the message was sent in + * @param client + * @param content - The text of the message + * @param options - The options used to build the message + * @internal + */ constructor(time, channel, client, content, options) { super(time, channel, client); this.content = content; this.options = options; } + /** + * Edit the message + * @param text - The new text of the message + * @param options - The new options used to build the message + */ async edit(text, options) { if (options) { options.original = this.createdTimestamp; @@ -21,6 +37,9 @@ class SentDataMessage extends SentMessage_1.SentMessage { } return await this.channel.send(text, options); } + /** + * Delete the message + */ async delete() { if (this.channel instanceof Group_1.Group) { let groupData = await CLIDispatcher_1.CLIDispatcher.dispatch("listGroups", {}, this.client.process); |