Closed starryeye-0001 closed 10 months ago
抓个这个报错之前收到的payload
好像刚刚上头我写的 async def message_getter(guild): @client.event async def on_message(message: qq.Message): print(message.content)
啊找到了,不是那个(那个刚刚根本没跑)
DEBUG:qq.client:分派事件 socket_event_type
DEBUG:qq.client:分派事件 user_update
DEBUG:qq.client:分派事件 member_update
DEBUG:qq.gateway:使用序列 60 保持分片 ID None websocket 处于活动状态。
DEBUG:qq.gateway:分片 ID None:WebSocket 事件:{'op': 11}
DEBUG:qq.gateway:分片 ID None:WebSocket 事件:{'op': 0, 's': 61, 't': 'PUBLIC_MESSAGE_DELETE', 'id': 'PUBLIC_MESSAGE_DELETE:12539778-5a93-4119-ab1a-7dff9b5d9eb8', 'd': {'message': {'author': {'bot': False, 'id': '1775357071882651195', 'username': '童话镇里的七彩河'}, 'channel_id': '1370006', 'guild_id': '6318270414311592983', 'id': '0897a89cbff5aec0d7571096cf533899dba40348c78af1ab06'}, 'op_user': {'id': '1775357071882651195'}}}
DEBUG:qq.client:分派事件 socket_event_type
DEBUG:qq.client:分派事件 raw_message_delete
DEBUG:qq.gateway:分片 ID None:WebSocket 事件:{'op': 7}
DEBUG:qq.gateway:收到 RECONNECT 操作码。
INFO:qq.client:收到了 RESUME websocket 的请求。
DEBUG:qq.client:分派事件 disconnect
DEBUG:qq.http:GET https://api.sgroup.qq.com/gateway 与 None 已返回 200 Trace ID: f1de54bd5b81ba337cc92b59922dc4c0
DEBUG:qq.http:GET https://api.sgroup.qq.com/gateway 已收到 {'url': 'wss://api.sgroup.qq.com/websocket'}
DEBUG:qq.gateway:创建连接到 wss://api.sgroup.qq.com/websocket 的 websocket
DEBUG:qq.gateway:分片 ID None:WebSocket 事件:{'d': {'heartbeat_interval': 41250}, 'op': 10}
INFO:qq.gateway:分片 ID None 已发送 RESUME 负载。
DEBUG:qq.gateway:分片 ID None:WebSocket 事件:{'op': 0, 's': 62, 't': 'RESUMED', 'd': ''}
DEBUG:qq.client:分派事件 socket_event_type
INFO:qq.client:清理任务。
INFO:qq.client:在 2 个任务后清理。
INFO:qq.client:所有任务都取消了。
INFO:qq.client:关闭事件循环。
Traceback (most recent call last):
File "c:\Users\13801\Documents\GitHub\Apocalypse-Barrier\qqbot.py", line 1347, in
client.run(token=token)
File "C:\Users\13801\AppData\Local\Programs\Python\Python311\Lib\site-packages\qq\client.py", line 458, in run
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\13801\AppData\Local\Programs\Python\Python311\Lib\site-packages\qq\client.py", line 437, in runner
await self.start(**kwargs)
File "C:\Users\13801\AppData\Local\Programs\Python\Python311\Lib\site-packages\qq\client.py", line 473, in start
await self.connect(reconnect=reconnect)
File "C:\Users\13801\AppData\Local\Programs\Python\Python311\Lib\site-packages\qq\client.py", line 516, in connect
await self.ws.poll_event()
File "C:\Users\13801\AppData\Local\Programs\Python\Python311\Lib\site-packages\qq\gateway.py", line 491, in poll_event
await self.received_message(msg.data)
File "C:\Users\13801\AppData\Local\Programs\Python\Python311\Lib\site-packages\qq\gateway.py", line 368, in received_message
data["msg_id"] = msg_id
TypeError: 'str' object does not support item assignment
摘要
client.run报错
复现步骤
无
最小的复现代码
预期结果
无
实际结果
Traceback (most recent call last): File "c:\Users\13801\Documents\GitHub\Apocalypse-Barrier\qqbot.py", line 1306, in
client.run(token=token)
File "C:\Users\13801\AppData\Local\Programs\Python\Python311\Lib\site-packages\qq\client.py", line 458, in run
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\13801\AppData\Local\Programs\Python\Python311\Lib\site-packages\qq\client.py", line 437, in runner
await self.start(**kwargs)
File "C:\Users\13801\AppData\Local\Programs\Python\Python311\Lib\site-packages\qq\client.py", line 473, in start
await self.connect(reconnect=reconnect)
File "C:\Users\13801\AppData\Local\Programs\Python\Python311\Lib\site-packages\qq\client.py", line 516, in connect
await self.ws.poll_event()
File "C:\Users\13801\AppData\Local\Programs\Python\Python311\Lib\site-packages\qq\gateway.py", line 491, in poll_event
await self.received_message(msg.data)
File "C:\Users\13801\AppData\Local\Programs\Python\Python311\Lib\site-packages\qq\gateway.py", line 368, in received_message
data["msg_id"] = msg_id