fork download
  1. def foo(bot, update):
  2. cmd = update.message.text.strip('/')
  3. update.message.reply_text('command filter\ncmd: "%s"' % cmd)
  4.  
  5.  
  6. def main():
  7.  
  8. # some code here...
  9.  
  10. # Фильтр должен идти после всех комманд-хэндлеров, как я понимаю
  11. dp.add_handler(MessageHandler(Filters.command, test))
  12.  
Success #stdin #stdout 0.01s 28384KB
stdin
Standard input is empty
stdout
Standard output is empty