nick.lua:

Less stupidly written.
  Owner can now set other users' nicknames via reply.
patterns.lua:
  Minor code changes.
This commit is contained in:
topkecleon
2016-03-08 04:17:55 -05:00
parent 7813564209
commit a2bdecb7bb
2 changed files with 28 additions and 18 deletions

View File

@ -8,8 +8,8 @@ local triggers = {
local action = function(msg)
if not msg.reply_to_message then return end
msg.reply_to_message.text = msg.reply_to_message.text or ''
local output = msg.reply_to_message.text:gsub(
local output = msg.reply_to_message.text or ''
output = output:gsub(
msg.text:match('^/s/(.-)/(.-)/?$')
)
output = 'Did you mean:\n"' .. output:sub(1, 4000) .. '"'