From 1ace26b67f5d61e49bdeb6725f8204384fbe6c04 Mon Sep 17 00:00:00 2001 From: Samuel Elliott Date: Thu, 26 Apr 2018 19:52:56 +0100 Subject: [PATCH] Select the channel when sending messages --- client/src/structs/discord/channel.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/src/structs/discord/channel.js b/client/src/structs/discord/channel.js index 3c9afeca..5cdc07ba 100644 --- a/client/src/structs/discord/channel.js +++ b/client/src/structs/discord/channel.js @@ -63,6 +63,8 @@ export class Channel { async sendMessage(content, parse = false) { if (this.assertPermissions) this.assertPermissions('SEND_MESSAGES', Modules.DiscordPermissions.VIEW_CHANNEL | Modules.DiscordPermissions.SEND_MESSAGES); + this.select(); + if (parse) content = Modules.MessageParser.parse(this.discordObject, content); else content = {content}; @@ -76,6 +78,7 @@ export class Channel { * @return {Message} */ sendBotMessage(content) { + this.select(); const message = Modules.MessageParser.createBotMessage(this.id, content); Modules.MessageActions.receiveMessage(this.id, message); return Message.from(Modules.MessageStore.getMessage(this.id, message.id));