patterns.lua - Bugfix; was gsub-ing twice.

This commit is contained in:
topkecleon
2016-05-13 13:22:10 -04:00
parent 24892a9537
commit 7df8992abe
2 changed files with 18 additions and 41 deletions

View File

@ -1,6 +1,3 @@
-- Shout-out to Kenny, as I didn't want to write this until
-- he upset himself over the very thought of me doing so.
local patterns = {}
local bindings = require('bindings')
@ -25,7 +22,6 @@ function patterns:action(msg)
bindings.sendReply(self, msg, output)
return
end
output = output:gsub(m1, m2)
output = 'Did you mean:\n"' .. output:sub(1, 4000) .. '"'
bindings.sendReply(self, msg.reply_to_message, output)