Skip to content

Commit ca34215

Browse files
committed
Merge branch 'develop': Fix FSM default state
2 parents e888f52 + b4d09f9 commit ca34215

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

aioalice/dispatcher/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from . import api
66
from .handler import Handler
7-
from .storage import DisabledStorage, MemoryStorage
7+
from .storage import DisabledStorage, MemoryStorage, DEFAULT_STATE
88
from .filters import generate_default_filters, ExceptionsFilter
99
from ..utils import json, exceptions
1010

@@ -58,7 +58,7 @@ async def process_request(self, request):
5858
raise
5959

6060
def register_request_handler(self, callback, *, commands=None, contains=None, starts_with=None, request_type=None,
61-
func=None, state=None, regexp=None, custom_filters=None, **kwargs):
61+
func=None, state=DEFAULT_STATE, regexp=None, custom_filters=None, **kwargs):
6262
"""
6363
Register handler for AliceRequest
6464
@@ -93,7 +93,7 @@ async def handle_all_requests(alice_request):
9393
self.requests_handlers.register(callback, prepared_filers)
9494

9595
def request_handler(self, *custom_filters, commands=None, contains=None, starts_with=None,
96-
request_type=None, func=None, state=None, regexp=None, **kwargs):
96+
request_type=None, func=None, state=DEFAULT_STATE, regexp=None, **kwargs):
9797
"""
9898
Decorator AliceRequest handler
9999

0 commit comments

Comments
 (0)