From 75b292077737e218e75b3a2d83518a68221dbc77 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Tue, 14 Jul 2020 01:38:35 +0300 Subject: [PATCH] Use explicit parameters for Thread#postSystemMessage, Thread#sendSystemMessageToUser, Thread#postNonLogMessage --- src/data/Thread.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/data/Thread.js b/src/data/Thread.js index 1db3bc1..054b48d 100644 --- a/src/data/Thread.js +++ b/src/data/Thread.js @@ -284,8 +284,8 @@ class Thread { } /** - * @param {string|Eris.MessageContent} content - * @param {*} args + * @param {Eris.MessageContent} content + * @param {Eris.MessageFile} file * @returns {Promise} */ async postSystemMessage(content, file = null) { @@ -303,12 +303,12 @@ class Thread { } /** - * @param {string|Eris.MessageContent} content - * @param {*} args + * @param {Eris.MessageContent} content + * @param {Eris.MessageFile} file * @returns {Promise} */ - async sendSystemMessageToUser(content, ...args) { - const msg = await this._sendDMToUser(content, ...args); + async sendSystemMessageToUser(content, file = null) { + const msg = await this._sendDMToUser(content, file); await this._addThreadMessageToDB({ message_type: THREAD_MESSAGE_TYPE.SYSTEM_TO_USER, user_id: null, @@ -320,11 +320,12 @@ class Thread { } /** - * @param {*} args - * @returns {Promise} + * @param {Eris.MessageContent} content + * @param {Eris.MessageFile} file + * @return {Promise} */ - async postNonLogMessage(...args) { - await this._postToThreadChannel(...args); + async postNonLogMessage(content, file = null) { + return this._postToThreadChannel(content, file); } /**