mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-03-14 19:48:57 +01:00
Processing commands without casting to UTF-8
This commit is contained in:
parent
fb34f81533
commit
00e2b4815a
1 changed files with 2 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue