mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Add state_list to StatesGroup
This commit is contained in:
parent
1797f076dc
commit
d466da3542
@ -81,6 +81,11 @@ class StatesGroup:
|
|||||||
value.name = ':'.join((cls.__name__, name))
|
value.name = ':'.join((cls.__name__, name))
|
||||||
value.group = cls
|
value.group = cls
|
||||||
|
|
||||||
|
@property
|
||||||
|
def state_list(self):
|
||||||
|
return [value for name, value in self.__dict__.items()
|
||||||
|
if not name.startswith('__') and not callable(value) and isinstance(value, State)]
|
||||||
|
|
||||||
|
|
||||||
class SkipHandler:
|
class SkipHandler:
|
||||||
"""
|
"""
|
||||||
|
@ -191,6 +191,11 @@ class StatesGroup:
|
|||||||
value.name = ':'.join((cls.__name__, name))
|
value.name = ':'.join((cls.__name__, name))
|
||||||
value.group = cls
|
value.group = cls
|
||||||
|
|
||||||
|
@property
|
||||||
|
def state_list(self):
|
||||||
|
return [value for name, value in self.__dict__.items()
|
||||||
|
if not name.startswith('__') and not callable(value) and isinstance(value, State)]
|
||||||
|
|
||||||
|
|
||||||
class BaseMiddleware:
|
class BaseMiddleware:
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user