diff --git a/otouto/bot.lua b/otouto/bot.lua index b715748..3102899 100644 --- a/otouto/bot.lua +++ b/otouto/bot.lua @@ -105,10 +105,9 @@ function bot:on_msg_receive(msg, config) -- The fn run whenever a message is rec -- gsub out user name if multiple bots are in the same group if msg.text:match(config.cmd_pat..'([A-Za-z0-9-_-]+)@'..self.info.username) then - msg.text = string.gsub(msg.text, '@'..self.info.username, "") + msg.text = string.gsub(msg.text, config.cmd_pat..'([A-Za-z0-9-_-]+)@'..self.info.username, "/%1") msg.text_lower = msg.text:lower() end - msg = pre_process_msg(self, msg, config) for _, plugin in ipairs(self.plugins) do