mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-12-22 22:45:09 +01:00
dispatcher.addHandler(): validate value of group is int
This commit is contained in:
parent
856f4460fc
commit
1f83e7ae4e
1 changed files with 2 additions and 0 deletions
|
@ -220,6 +220,8 @@ class Dispatcher(object):
|
|||
if not isinstance(handler, Handler):
|
||||
raise TypeError(
|
||||
'handler is not an instance of {0}'.format(Handler.__name__))
|
||||
if not isinstance(group, int):
|
||||
raise TypeError('group is not int')
|
||||
|
||||
if group not in self.handlers:
|
||||
self.handlers[group] = list()
|
||||
|
|
Loading…
Reference in a new issue