diff --git a/scripts/memes.coffee b/scripts/memes.coffee index 8b4ebdb..63c863b 100644 --- a/scripts/memes.coffee +++ b/scripts/memes.coffee @@ -23,6 +23,7 @@ module.exports = (robot) -> sapere sapere come funziona il comando' escape = (str) -> + return '_' unless str.length str.replace( /-/g, '--') .replace(/\ /g, '-') .replace( /_/g, '__') @@ -42,10 +43,8 @@ module.exports = (robot) -> names = template.aliases res.send (gen_meme names[0], title, names.join ', '), if robot.adapterName is 'tg' then cb else '' - cb() if robot.adapterName isnt 'tg' - robot.respond /meme (.+)/i, (res) -> args = (i.trim() for i in res.match[1].split ',') return res.send usage if args.length != 3