Processing commands without casting to UTF-8

This commit is contained in:
Dmitriy 2016-03-13 12:32:27 +03:00
parent fb34f81533
commit 00e2b4815a

View file

@ -23,7 +23,7 @@ import logging
from functools import wraps
from inspect import getargspec
from threading import Thread, BoundedSemaphore, Lock, Event, current_thread
from re import match
from re import match, split
from time import sleep
from telegram import (TelegramError, Update, NullHandler)
@ -548,7 +548,7 @@ class Dispatcher:
command
"""
command = update.message.text.decode('utf-8').split()[0][1:].split('@')[0]
command = split('\W', update.message.text[1:])[0]
if command in self.telegram_command_handlers:
self.dispatchTo(self.telegram_command_handlers[command], update,