Size: a a a

2016 October 20

JG

Jesús González in Dev Chat
but i need the bot catch any word or phrase that is not a command
источник

JG

Jesús González in Dev Chat
mmm
источник

JG

Jesús González in Dev Chat
regexp for any kind or phrase its my way
источник

JG

Jesús González in Dev Chat
no?
источник

JG

Jesús González in Dev Chat
im working in a passive bot that analyze big groups of telegram
источник

JG

Jesús González in Dev Chat
can you give a little snippet of the use a simple regexp?
источник

SF

Sergei Fonov in Dev Chat
You see this one

tg.router
   .when(
       new CustomFilterCommand($ => {
           return $.message.text == 'some text'
       }, 'customFilterHandler'),
       new CustomFilterHandlerController()
   )
источник

JG

Jesús González in Dev Chat
ok, if some person write 'some text' the CustomFileterHandlerController is called and i can do something
источник

JG

Jesús González in Dev Chat
yes?
источник

SF

Sergei Fonov in Dev Chat
Yes
источник

JG

Jesús González in Dev Chat
thanks so much!
источник

SF

Sergei Fonov in Dev Chat
You can make any validation in body function
источник

SF

Sergei Fonov in Dev Chat
Jesús González
thanks so much!
You welcome))
источник

JG

Jesús González in Dev Chat
we are in touch, in few weeks i ll give you my bot!
источник

JG

Jesús González in Dev Chat
jajajaj
источник

JG

Jesús González in Dev Chat
NodeJS rules man!
источник

SF

Sergei Fonov in Dev Chat
Cool!
источник

SF

Sergei Fonov in Dev Chat
Jesús González
we are in touch, in few weeks i ll give you my bot!
Change a word
источник

NA

Narek Abovyan in Dev Chat
Hey, you can use otherwise controller for that:


tg.router
   .when(
       new TextCommand('some command', 'handler'),
       new CommandController()
   )
   .otherwise(OtherwiseController()) //all other messages will be passed to this controller
источник

SF

Sergei Fonov in Dev Chat
But I think my choice is batter.
источник