Skip to content

Commands and \n after aren't processed by CommandHandler #868

@vikanezrimaya

Description

@vikanezrimaya

Steps to reproduce

  1. Make a bot with a CommandHandler

  2. Send a command with \n after it without space! Like this:

/feedback
some text

Expected behaviour

Command should not be ignored...

Actual behaviour

...but it is ignored instead

Configuration

Operating System:
Gentoo

Version of Python, python-telegram-bot & dependencies:

$ python -m telegram

Traceback (most recent call last):
  File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/kisik21/Projects/Nadeko/.virtualenv/lib64/python3.6/site-packages/telegram/__main__.py", line 3, in <module>
    import urllib3
ModuleNotFoundError: No module named 'urllib3'

Okay, I installed urllib3...

python-telegram-bot 6.1.0
urllib3 1.22
certifi 2017.04.17
future 0.16.0
Python 3.6.1 (default, Sep 25 2017, 22:51:25)  [GCC 5.4.0]

Logs

Don't think this applies here.

The issue is probably the CommandHandler - I read the code, it thinks of \n as a part of command string. We need to strip these while detecting command names, I think...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy