Skip to content

Commit

Permalink
🐛 Fix: 修复回复事件对象猜测 (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyongyu authored Oct 12, 2023
1 parent 3e5419d commit d6d8eb8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nonebot/adapters/onebot/v11/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,11 @@ async def send(
if "group_id" in event_dict: # copy the group_id to the API params if exists
params.setdefault("group_id", event_dict["group_id"])

if "message_type" not in params: # guess the message_type
# guess the message_type
if "message_type" in event_dict:
params.setdefault("message_type", event_dict["message_type"])

if "message_type" not in params:
if params.get("group_id") is not None:
params["message_type"] = "group"
elif params.get("user_id") is not None:
Expand Down

0 comments on commit d6d8eb8

Please sign in to comment.