Skip to content

Commit

Permalink
main: add about command
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali Mihandoost committed Sep 19, 2015
1 parent f6d0af7 commit c36657b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ REGEXPS = {
subscribe: /start|subscribe|عضویت/i,
unsubscribe: /stop|unsubscribe|خروج|لغو\s*عضویت/i,
hello: /hi|hello|welcome|سلام|درود|خوش\s*[اآ]مدی/i,
help: /help|راهنما/i
help: /help|راهنما/i,
about: /about|درباره/i
},
//TODO: fix msg text length

Expand Down Expand Up @@ -149,6 +150,13 @@ onMessage = (msg) => {
return;
}

// about
if (REGEXPS.about.test(msg.text))
{
sendMessage(msg.chat.id, l10n('about').replace('%name%', msg.from.first_name));
return;
}


//Hello
if (REGEXPS.hello.test(msg.text))
Expand Down

0 comments on commit c36657b

Please sign in to comment.