diff --git a/src/structures/Client.js b/src/structures/Client.js index 9a1826d..331ef5f 100644 --- a/src/structures/Client.js +++ b/src/structures/Client.js @@ -341,7 +341,9 @@ class Client extends EventEmitter { * @returns {Promise} */ async logout () { - await this.ig.account.logout() + await this.ig.account.logout(); + await this.ig.realtime.disconnect(); + await this.ig.fbns.disconnect(); } /** diff --git a/src/structures/Message.js b/src/structures/Message.js index 08bde81..61357af 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -81,7 +81,7 @@ class Message { } } else { this.storyShareData = { - author: this.client._patchOrCreateUser(data.story_share.media.user.pk, data.story_share.media.user), + author: this.client._patchOrCreateUser(data.story_share.media?.user.pk, data.story_share.media?.user), sourceURL: data.story_share.media.image_versions2.candidates[0].url } } @@ -211,7 +211,7 @@ class Message { * @returns {Promise} */ reply (content) { - return this.chat.sendMessage(`${this.client.options.disableReplyPrefix ? '' : `${this.author.username}, `}${content}`) + return this.chat.sendMessage(`${this.client.options.disableReplyPrefix ? '' : `@${this.author.username}, `}${content}`) } toString () {