diff --git a/README.md b/README.md index b40ba496b..64936bfe1 100644 --- a/README.md +++ b/README.md @@ -279,6 +279,10 @@ PS: **ARM平台** 请使用全量版 同时 **如果你的机器 RAM < 1G 可能 ## 更新 +### 2022/9/10 + +* 自定义群欢迎消息参数不完全时提示报错 + ### 2022/9/8 * 添加插件数据初始化判断 diff --git a/basic_plugins/admin_bot_manage/custom_welcome_message.py b/basic_plugins/admin_bot_manage/custom_welcome_message.py index 5b656b5d3..1b82f421b 100755 --- a/basic_plugins/admin_bot_manage/custom_welcome_message.py +++ b/basic_plugins/admin_bot_manage/custom_welcome_message.py @@ -36,11 +36,11 @@ @custom_welcome.handle() async def _(event: GroupMessageEvent, arg: Message = CommandArg()): + msg = arg.extract_plain_text().strip() + img = get_message_img(event.json()) + if not msg and not img: + await custom_welcome.finish(__plugin_usage__) try: - msg = arg.extract_plain_text().strip() - img = get_message_img(event.json()) - if not msg and not img: - await custom_welcome.finish(__plugin_usage__) await custom_welcome.send( await custom_group_welcome(msg, img, event.user_id, event.group_id), at_sender=True,