diff --git a/nonebot/natural_language.py b/nonebot/natural_language.py index 3a246158..8df08fbd 100644 --- a/nonebot/natural_language.py +++ b/nonebot/natural_language.py @@ -42,6 +42,9 @@ def on_natural_language(keywords: Union[Optional[Iterable], Callable] = None, :param allow_empty_message: handle empty messages """ + if isinstance(keywords, str): + keywords = (keywords,) + def deco(func: Callable) -> Callable: nl_processor = NLProcessor(func=func, keywords=keywords, permission=permission,