Skip to content

Commit

Permalink
💥 version 0.10.0
Browse files Browse the repository at this point in the history
Markable Text
  • Loading branch information
RF-Tar-Railt committed Mar 4, 2024
1 parent 52984f9 commit c33df93
Show file tree
Hide file tree
Showing 5 changed files with 179 additions and 170 deletions.
6 changes: 5 additions & 1 deletion nonebot/adapters/satori/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
from .utils import API, log
from .config import ClientInfo
from .event import Event, MessageEvent
from .message import Message, MessageSegment
from .models import InnerMessage as SatoriMessage
from .message import Author, Message, RenderMessage, MessageSegment
from .models import Role, User, Guild, Login, Channel, PageResult, OuterMember
from .exception import (
ActionFailed,
Expand Down Expand Up @@ -47,11 +47,15 @@ def _check_reply(
return

msg_seg = message[index]
if TYPE_CHECKING:
assert isinstance(msg_seg, RenderMessage)
event.reply = msg_seg # type: ignore

author_msg = msg_seg.data["content"].get("author")
if author_msg:
author_seg = author_msg[0]
if TYPE_CHECKING:
assert isinstance(author_seg, Author)
event.to_me = author_seg.data.get("id") == bot.self_id

del message[index]
Expand Down
Loading

0 comments on commit c33df93

Please sign in to comment.