mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Add the possibility to getbase class of a State object
This commit is contained in:
parent
fbb9a73fc0
commit
fec47cecaf
@ -29,6 +29,7 @@ class StatesGroup:
|
|||||||
if not name.startswith('__') and not callable(value) and isinstance(value, State):
|
if not name.startswith('__') and not callable(value) and isinstance(value, State):
|
||||||
# change value of that variable
|
# change value of that variable
|
||||||
value.name = ':'.join((cls.__name__, name))
|
value.name = ':'.join((cls.__name__, name))
|
||||||
|
value.group = cls
|
||||||
|
|
||||||
|
|
||||||
class SkipHandler:
|
class SkipHandler:
|
||||||
|
@ -163,6 +163,10 @@ class StatesGroup:
|
|||||||
if not name.startswith('__') and not callable(value) and isinstance(value, State):
|
if not name.startswith('__') and not callable(value) and isinstance(value, State):
|
||||||
# change value of that variable
|
# change value of that variable
|
||||||
value.name = ':'.join((cls.__name__, name))
|
value.name = ':'.join((cls.__name__, name))
|
||||||
|
value.group = cls
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class BaseMiddleware:
|
class BaseMiddleware:
|
||||||
|
Loading…
Reference in New Issue
Block a user