diff --git a/src/Client.js b/src/Client.js index 1e77f55..762c5f7 100644 --- a/src/Client.js +++ b/src/Client.js @@ -536,28 +536,25 @@ class Client extends EventEmitter { } /** - * Mutes the Chat until a specified date and returns the new mute state + * Mutes the Chat until a specified date * @param {string} chatId ID of the chat that will be muted * @param {Date} unmuteDate Date when the chat will be unmuted - * @returns {Promise} new mute state */ async muteChat(chatId, unmuteDate) { - return await this.pupPage.evaluate(async (chatId, timestamp) => { + await this.pupPage.evaluate(async (chatId, timestamp) => { let chat = await window.Store.Chat.get(chatId); await chat.mute.mute(timestamp, !0); }, chatId, unmuteDate.getTime() / 1000); } /** - * Unmutes the Chat and returns the new mute state + * Unmutes the Chat * @param {string} chatId ID of the chat that will be unmuted - * @returns {Promise} new mute state */ async unmuteChat(chatId) { - return await this.pupPage.evaluate(async chatId => { + await this.pupPage.evaluate(async chatId => { let chat = await window.Store.Chat.get(chatId); await window.Store.Cmd.muteChat(chat, false); - return chat.mute.isMuted; }, chatId); } diff --git a/src/structures/Chat.js b/src/structures/Chat.js index c01bf52..4217b59 100644 --- a/src/structures/Chat.js +++ b/src/structures/Chat.js @@ -115,7 +115,6 @@ class Chat extends Base { /** * Mutes this chat until a specified date * @param {Date} unmuteDate Date at which the Chat will be unmuted - * @returns {Promise} new mute state */ async mute(unmuteDate) { return this.client.muteChat(this.id._serialized, unmuteDate); @@ -123,7 +122,6 @@ class Chat extends Base { /** * Unmutes this chat - * @returns {Promise} new mute state */ async unmute() { return this.client.unmuteChat(this.id._serialized);