Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
MeetWq committed Sep 7, 2024
1 parent 5e732b6 commit 1a5cb23
Show file tree
Hide file tree
Showing 5 changed files with 909 additions and 822 deletions.
8 changes: 4 additions & 4 deletions nonebot_plugin_chatrecorder/adapters/satori.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

try:
from nonebot.adapters.satori import Bot, Message, MessageEvent
from nonebot.adapters.satori.models import InnerMessage as SatoriMessage
from nonebot.adapters.satori.models import MessageObject

adapter = SupportedAdapter.satori

Expand Down Expand Up @@ -60,9 +60,9 @@ async def record_send_msg(
if api not in ["message_create"]:
return
for res in result:
if not isinstance(res, SatoriMessage):
if not isinstance(res, MessageObject):
return
result_messages = cast(List[SatoriMessage], result)
result_messages = cast(List[MessageObject], result)

result_message = result_messages[0]
level = SessionLevel.LEVEL0
Expand Down Expand Up @@ -98,7 +98,7 @@ async def record_send_msg(
message_id = "_".join([msg.id for msg in result_messages])
message = Message()
for msg in result_messages:
message += Message.from_satori_element(msg.content)
message += Message(msg.content)
message_time = (
remove_timezone(result_message.created_at.astimezone(timezone.utc))
if result_message.created_at
Expand Down
Loading

0 comments on commit 1a5cb23

Please sign in to comment.