diff --git a/scripts/telegram.coffee b/scripts/telegram.coffee index 78ea317..2b31881 100644 --- a/scripts/telegram.coffee +++ b/scripts/telegram.coffee @@ -76,14 +76,18 @@ module.exports = (robot) -> res.send (res.random intro) + ':\n' + (list.map (i) -> '* '+i).join '\n' robot.respond /(mi )?invit(i|ami) (in|nel gruppo) (.+)\??/, (res) -> - nope = ['dove?', 'mai sentito questo?', 'invita anche me magari'] - ok = ['provvedo', 'ok', 'certo', 'va bene'] - done = ['fatto', 'ecco qui', 'ecco'] + denied = ['BZBZ ADMIN-NOT-DETECTED', 'BZBZ IS-NOT-AUTHORIZED', 'BZBZ ACCESS-DENIED'] + nope = ['ahahah NO', 'mai sentito questo?', 'invita anche me magari'] + ok = ['provvedo subito', 'ok', 'certo', 'va bene'] + done = ['fatto', 'ecco qui', 'ecco'] group_list (list) -> chat = res.match[4] if not chat in list res.send res.random nope return + if chat is process.env['ADMIN_ROOM_NAME'] + res.send res.random denied + return res.send res.random ok run_command "chat_add_user #{chat} #{res.message.user.name}" res.send res.random done