diff --git a/scripts/doge.coffee b/scripts/doge.coffee index 1d68422..f620e22 100644 --- a/scripts/doge.coffee +++ b/scripts/doge.coffee @@ -54,7 +54,7 @@ module.exports = (robot) -> regex = /\[(.+)\] (.+) [>«»]+ ((?:(?!\n(\[|\d))[\s\S])+)/g parse_line = (x) -> date: x[1] - peer: x[2].replace chat + ' ', '' + peer: x[2].replace(chat, '').trim() text: x[3].trim().replace '\n', ' ' run_command "history #{chat} #{size}", (lines) -> callback ((match_all regex, lines.join '\n').map parse_line)