Use explicit parameters for Thread#postSystemMessage, Thread#sendSystemMessageToUser, Thread#postNonLogMessage

cshd
Dragory 2020-07-14 01:38:35 +03:00
parent ec3a2455e0
commit 75b2920777
No known key found for this signature in database
GPG Key ID: 5F387BA66DF8AAC1
1 changed files with 11 additions and 10 deletions

View File

@ -284,8 +284,8 @@ class Thread {
}
/**
* @param {string|Eris.MessageContent} content
* @param {*} args
* @param {Eris.MessageContent} content
* @param {Eris.MessageFile} file
* @returns {Promise<void>}
*/
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<void>}
*/
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<void>}
* @param {Eris.MessageContent} content
* @param {Eris.MessageFile} file
* @return {Promise<Eris.Message|null>}
*/
async postNonLogMessage(...args) {
await this._postToThreadChannel(...args);
async postNonLogMessage(content, file = null) {
return this._postToThreadChannel(content, file);
}
/**