diff --git a/.gitignore b/.gitignore index ea2666b..b740dd2 100644 --- a/.gitignore +++ b/.gitignore @@ -216,6 +216,7 @@ ipython_config.py # in version control. # https://pdm.fming.dev/#use-with-ide .pdm-python +.pdm-build/ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm __pypackages__/ diff --git a/src/nonebot_plugin_alconna/matcher.py b/src/nonebot_plugin_alconna/matcher.py index 95abc67..8297ad7 100644 --- a/src/nonebot_plugin_alconna/matcher.py +++ b/src/nonebot_plugin_alconna/matcher.py @@ -673,7 +673,7 @@ def convert(cls, message: _M) -> Message | UniMessage | str: pass else: extra["$message_id"] = msg_id - return message.format(**state[ALCONNA_RESULT].result.all_matched_args, **state, **extra) + return message.format(**state[ALCONNA_RESULT].result.all_matched_args, **{**extra, **state}) if isinstance(message, Segment): return UniMessage(message) if isinstance(message, MessageSegment):