From 93031d6e3770ffe24f399f616c7bccece31c7306 Mon Sep 17 00:00:00 2001 From: ilim Date: Wed, 27 Feb 2019 13:38:48 +0900 Subject: [PATCH] Bugfix --- slack.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/slack.js b/slack.js index 2090570..0a14c29 100644 --- a/slack.js +++ b/slack.js @@ -34,6 +34,19 @@ module.exports.Slack = class Slack { async reply(message) { // console.debug(`message: ${JSON.stringify(message)}\n`); const {user, text, channel, subtype, ts} = message; + if (subtype === "bot_message" || subtype === "channel_join" || subtype === "group_join") { + return + } else if (subtype === "message_changed") { + return + } else if (subtype === "message_deleted") { + return + } else if (subtype === "message_replied") { + return + } else if (subtype) { + return + } + + console.log(user, this.rtm.activeUserId); if (user === this.rtm.activeUserId) { return } else if (!text || text === "/") {