nonebot-adapter-qq 1.6.2__py3-none-any.whl → 1.6.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nonebot/adapters/qq/__init__.py +9 -9
- nonebot/adapters/qq/adapter.py +25 -25
- nonebot/adapters/qq/bot.py +89 -62
- nonebot/adapters/qq/compat.py +1 -1
- nonebot/adapters/qq/config.py +2 -1
- nonebot/adapters/qq/event.py +18 -13
- nonebot/adapters/qq/exception.py +2 -2
- nonebot/adapters/qq/message.py +8 -9
- nonebot/adapters/qq/models/__init__.py +9 -9
- nonebot/adapters/qq/models/common.py +1 -1
- nonebot/adapters/qq/models/guild.py +6 -6
- nonebot/adapters/qq/models/payload.py +3 -2
- nonebot/adapters/qq/models/qq.py +1 -1
- nonebot/adapters/qq/permission.py +1 -1
- nonebot/adapters/qq/utils.py +3 -3
- {nonebot_adapter_qq-1.6.2.dist-info → nonebot_adapter_qq-1.6.4.dist-info}/METADATA +1 -1
- nonebot_adapter_qq-1.6.4.dist-info/RECORD +20 -0
- {nonebot_adapter_qq-1.6.2.dist-info → nonebot_adapter_qq-1.6.4.dist-info}/WHEEL +1 -1
- nonebot_adapter_qq-1.6.2.dist-info/RECORD +0 -20
- {nonebot_adapter_qq-1.6.2.dist-info → nonebot_adapter_qq-1.6.4.dist-info}/LICENSE +0 -0
nonebot/adapters/qq/__init__.py
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
+
from .adapter import Adapter as Adapter
|
1
2
|
from .bot import Bot as Bot
|
2
|
-
from .utils import log as log
|
3
3
|
from .event import * # noqa: F403
|
4
|
-
from .utils import escape as escape
|
5
|
-
from .adapter import Adapter as Adapter
|
6
|
-
from .message import Message as Message
|
7
|
-
from .permission import * # noqa: F403
|
8
|
-
from .utils import unescape as unescape
|
9
4
|
from .exception import ActionFailed as ActionFailed
|
10
|
-
from .exception import
|
11
|
-
from .message import MessageSegment as MessageSegment
|
5
|
+
from .exception import ApiNotAvailable as ApiNotAvailable
|
12
6
|
from .exception import AuditException as AuditException
|
7
|
+
from .exception import NetworkError as NetworkError
|
13
8
|
from .exception import NoLogException as NoLogException
|
14
|
-
from .exception import ApiNotAvailable as ApiNotAvailable
|
15
9
|
from .exception import QQAdapterException as QQAdapterException
|
16
10
|
from .exception import RateLimitException as RateLimitException
|
17
11
|
from .exception import UnauthorizedException as UnauthorizedException
|
12
|
+
from .message import Message as Message
|
13
|
+
from .message import MessageSegment as MessageSegment
|
14
|
+
from .permission import * # noqa: F403
|
15
|
+
from .utils import escape as escape
|
16
|
+
from .utils import log as log
|
17
|
+
from .utils import unescape as unescape
|
nonebot/adapters/qq/adapter.py
CHANGED
@@ -1,49 +1,49 @@
|
|
1
|
-
import sys
|
2
|
-
import json
|
3
1
|
import asyncio
|
4
2
|
import binascii
|
3
|
+
import json
|
4
|
+
import sys
|
5
|
+
from typing import Any, Literal, Optional, Union, cast
|
5
6
|
from typing_extensions import override
|
6
|
-
from typing import Any, Union, Literal, Optional, cast
|
7
7
|
|
8
|
-
from nonebot.utils import escape_tag
|
9
|
-
from nonebot.exception import WebSocketClosed
|
10
8
|
from cryptography.exceptions import InvalidSignature
|
11
9
|
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey
|
10
|
+
|
11
|
+
from nonebot import get_plugin_config
|
12
|
+
from nonebot.adapters import Adapter as BaseAdapter
|
12
13
|
from nonebot.compat import PYDANTIC_V2, type_validate_json, type_validate_python
|
13
14
|
from nonebot.drivers import (
|
14
15
|
URL,
|
16
|
+
ASGIMixin,
|
15
17
|
Driver,
|
18
|
+
HTTPClientMixin,
|
19
|
+
HTTPServerSetup,
|
16
20
|
Request,
|
17
21
|
Response,
|
18
|
-
ASGIMixin,
|
19
22
|
WebSocket,
|
20
|
-
HTTPClientMixin,
|
21
|
-
HTTPServerSetup,
|
22
23
|
WebSocketClientMixin,
|
23
24
|
)
|
24
|
-
|
25
|
-
from nonebot import
|
26
|
-
from nonebot.adapters import Adapter as BaseAdapter
|
25
|
+
from nonebot.exception import WebSocketClosed
|
26
|
+
from nonebot.utils import escape_tag
|
27
27
|
|
28
28
|
from .bot import Bot
|
29
|
-
from .
|
30
|
-
from .
|
31
|
-
from .config import Config, BotInfo
|
29
|
+
from .config import BotInfo, Config
|
30
|
+
from .event import EVENT_CLASSES, Event, MessageAuditEvent, ReadyEvent
|
32
31
|
from .exception import ApiNotAvailable
|
33
|
-
from .event import EVENT_CLASSES, Event, ReadyEvent, MessageAuditEvent
|
34
32
|
from .models import (
|
35
|
-
Hello,
|
36
|
-
Resume,
|
37
|
-
Payload,
|
38
33
|
Dispatch,
|
39
|
-
Identify,
|
40
34
|
Heartbeat,
|
41
|
-
Reconnect,
|
42
|
-
PayloadType,
|
43
35
|
HeartbeatAck,
|
44
|
-
|
36
|
+
Hello,
|
37
|
+
Identify,
|
45
38
|
InvalidSession,
|
39
|
+
Payload,
|
40
|
+
PayloadType,
|
41
|
+
Reconnect,
|
42
|
+
Resume,
|
43
|
+
WebhookVerify,
|
46
44
|
)
|
45
|
+
from .store import audit_result
|
46
|
+
from .utils import API, log
|
47
47
|
|
48
48
|
RECONNECT_INTERVAL = 3.0
|
49
49
|
|
@@ -268,9 +268,9 @@ class Adapter(BaseAdapter):
|
|
268
268
|
"""接收并处理服务器的 Hello 事件"""
|
269
269
|
try:
|
270
270
|
payload = await self.receive_payload(bot, ws)
|
271
|
-
assert isinstance(
|
272
|
-
payload
|
273
|
-
)
|
271
|
+
assert isinstance(payload, Hello), (
|
272
|
+
f"Received unexpected payload: {payload!r}"
|
273
|
+
)
|
274
274
|
return payload.data.heartbeat_interval
|
275
275
|
except Exception as e:
|
276
276
|
log(
|
nonebot/adapters/qq/bot.py
CHANGED
@@ -1,89 +1,95 @@
|
|
1
|
-
import json
|
2
1
|
from base64 import b64encode
|
3
|
-
from
|
4
|
-
from datetime import datetime,
|
2
|
+
from contextlib import suppress
|
3
|
+
from datetime import datetime, timedelta, timezone
|
4
|
+
import json
|
5
5
|
from typing import (
|
6
6
|
IO,
|
7
7
|
TYPE_CHECKING,
|
8
8
|
Any,
|
9
|
-
Union,
|
10
9
|
Literal,
|
11
10
|
NoReturn,
|
12
11
|
Optional,
|
12
|
+
Union,
|
13
13
|
cast,
|
14
14
|
overload,
|
15
15
|
)
|
16
|
+
from typing_extensions import Never, override
|
16
17
|
|
17
18
|
from pydantic import BaseModel
|
18
|
-
from nonebot.message import handle_event
|
19
|
-
from nonebot.drivers import Request, Response
|
20
|
-
from nonebot.compat import type_validate_python
|
21
19
|
|
22
20
|
from nonebot.adapters import Bot as BaseBot
|
21
|
+
from nonebot.compat import type_validate_python
|
22
|
+
from nonebot.drivers import Request, Response
|
23
|
+
from nonebot.message import handle_event
|
23
24
|
|
24
25
|
from .config import BotInfo
|
25
|
-
from .
|
26
|
-
|
27
|
-
|
28
|
-
|
26
|
+
from .event import (
|
27
|
+
C2CMessageCreateEvent,
|
28
|
+
DirectMessageCreateEvent,
|
29
|
+
Event,
|
30
|
+
GroupAtMessageCreateEvent,
|
31
|
+
GuildMessageEvent,
|
32
|
+
InteractionCreateEvent,
|
33
|
+
QQMessageEvent,
|
34
|
+
ReadyEvent,
|
35
|
+
)
|
29
36
|
from .exception import (
|
30
37
|
ActionFailed,
|
31
|
-
NetworkError,
|
32
|
-
AuditException,
|
33
38
|
ApiNotAvailable,
|
39
|
+
AuditException,
|
40
|
+
NetworkError,
|
34
41
|
RateLimitException,
|
35
42
|
UnauthorizedException,
|
36
43
|
)
|
37
|
-
from .
|
38
|
-
Event,
|
39
|
-
ReadyEvent,
|
40
|
-
QQMessageEvent,
|
41
|
-
GuildMessageEvent,
|
42
|
-
C2CMessageCreateEvent,
|
43
|
-
InteractionCreateEvent,
|
44
|
-
DirectMessageCreateEvent,
|
45
|
-
GroupAtMessageCreateEvent,
|
46
|
-
)
|
44
|
+
from .message import Message, MessageSegment
|
47
45
|
from .models import (
|
46
|
+
DMS,
|
47
|
+
APIPermissionDemand,
|
48
|
+
APIPermissionDemandIdentify,
|
49
|
+
AudioControl,
|
50
|
+
AudioStatus,
|
51
|
+
Channel,
|
52
|
+
ChannelPermissions,
|
53
|
+
ChannelSubType,
|
54
|
+
ChannelType,
|
48
55
|
Dispatch,
|
49
|
-
RichText,
|
50
|
-
Schedule,
|
51
56
|
EmojiType,
|
57
|
+
GetGuildAPIPermissionReturn,
|
58
|
+
GetGuildRolesReturn,
|
59
|
+
GetReactionUsersReturn,
|
60
|
+
GetRoleMembersReturn,
|
61
|
+
GetThreadReturn,
|
62
|
+
GetThreadsListReturn,
|
63
|
+
Guild,
|
64
|
+
Media,
|
65
|
+
Member,
|
52
66
|
MessageArk,
|
53
|
-
RemindType,
|
54
|
-
AudioStatus,
|
55
|
-
ChannelType,
|
56
|
-
PinsMessage,
|
57
|
-
PrivateType,
|
58
|
-
AudioControl,
|
59
67
|
MessageEmbed,
|
60
|
-
UrlGetReturn,
|
61
|
-
ChannelSubType,
|
62
|
-
MessageSetting,
|
63
|
-
GetThreadReturn,
|
64
68
|
MessageKeyboard,
|
65
69
|
MessageMarkdown,
|
66
|
-
PutThreadReturn,
|
67
|
-
SpeakPermission,
|
68
70
|
MessageReference,
|
69
|
-
|
70
|
-
ShardUrlGetReturn,
|
71
|
-
ChannelPermissions,
|
72
|
-
PostC2CFilesReturn,
|
73
|
-
APIPermissionDemand,
|
74
|
-
GetGuildRolesReturn,
|
75
|
-
PostGuildRoleReturn,
|
76
|
-
GetRoleMembersReturn,
|
77
|
-
GetThreadsListReturn,
|
71
|
+
MessageSetting,
|
78
72
|
PatchGuildRoleReturn,
|
79
|
-
|
73
|
+
PinsMessage,
|
74
|
+
PostC2CFilesReturn,
|
80
75
|
PostC2CMessagesReturn,
|
81
|
-
|
76
|
+
PostGroupFilesReturn,
|
82
77
|
PostGroupMembersReturn,
|
83
78
|
PostGroupMessagesReturn,
|
84
|
-
|
85
|
-
|
79
|
+
PostGuildRoleReturn,
|
80
|
+
PrivateType,
|
81
|
+
PutThreadReturn,
|
82
|
+
RecommendChannel,
|
83
|
+
RemindType,
|
84
|
+
RichText,
|
85
|
+
Schedule,
|
86
|
+
ShardUrlGetReturn,
|
87
|
+
SpeakPermission,
|
88
|
+
UrlGetReturn,
|
89
|
+
User,
|
86
90
|
)
|
91
|
+
from .models import Message as GuildMessage
|
92
|
+
from .utils import API, exclude_none, log
|
87
93
|
|
88
94
|
if TYPE_CHECKING:
|
89
95
|
from .adapter import Adapter
|
@@ -255,6 +261,15 @@ class Bot(BaseBot):
|
|
255
261
|
" Please check your config."
|
256
262
|
)
|
257
263
|
data = json.loads(resp.content)
|
264
|
+
if (
|
265
|
+
not isinstance(data, dict)
|
266
|
+
or "access_token" not in data
|
267
|
+
or "expires_in" not in data
|
268
|
+
):
|
269
|
+
raise NetworkError(
|
270
|
+
f"Get authorization failed with invalid response {data!r}."
|
271
|
+
" Please check your config."
|
272
|
+
)
|
258
273
|
self._access_token = cast(str, data["access_token"])
|
259
274
|
self._expires_in = datetime.now(timezone.utc) + timedelta(
|
260
275
|
seconds=int(data["expires_in"])
|
@@ -531,6 +546,23 @@ class Bot(BaseBot):
|
|
531
546
|
raise RuntimeError("Event cannot be replied to!")
|
532
547
|
|
533
548
|
# API request methods
|
549
|
+
def _handle_audit(self, response: Response) -> None:
|
550
|
+
if 200 <= response.status_code <= 202:
|
551
|
+
with suppress(json.JSONDecodeError):
|
552
|
+
if (
|
553
|
+
response.content
|
554
|
+
and (content := json.loads(response.content))
|
555
|
+
and isinstance(content, dict)
|
556
|
+
and (
|
557
|
+
audit_id := (
|
558
|
+
content.get("data", {})
|
559
|
+
.get("message_audit", {})
|
560
|
+
.get("audit_id", None)
|
561
|
+
)
|
562
|
+
)
|
563
|
+
):
|
564
|
+
raise AuditException(audit_id)
|
565
|
+
|
534
566
|
def _handle_response(self, response: Response) -> Any:
|
535
567
|
if trace_id := response.headers.get("X-Tps-trace-ID", None):
|
536
568
|
log(
|
@@ -538,15 +570,10 @@ class Bot(BaseBot):
|
|
538
570
|
f"Called API {response.request and response.request.url} "
|
539
571
|
f"response {response.status_code} with trace id {trace_id}",
|
540
572
|
)
|
573
|
+
|
574
|
+
self._handle_audit(response)
|
575
|
+
|
541
576
|
if response.status_code == 201 or response.status_code == 202:
|
542
|
-
if response.content and (content := json.loads(response.content)):
|
543
|
-
audit_id = (
|
544
|
-
content.get("data", {})
|
545
|
-
.get("message_audit", {})
|
546
|
-
.get("audit_id", None)
|
547
|
-
)
|
548
|
-
if audit_id:
|
549
|
-
raise AuditException(audit_id)
|
550
577
|
raise ActionFailed(response)
|
551
578
|
elif 200 <= response.status_code < 300:
|
552
579
|
return response.content and json.loads(response.content)
|
@@ -1647,8 +1674,8 @@ class Bot(BaseBot):
|
|
1647
1674
|
timestamp: Optional[Union[int, datetime]] = None,
|
1648
1675
|
) -> PostC2CMessagesReturn:
|
1649
1676
|
# tmp fix. content must not be none if sending media
|
1650
|
-
if media is not None and not content:
|
1651
|
-
|
1677
|
+
# if media is not None and not content:
|
1678
|
+
# content = " "
|
1652
1679
|
|
1653
1680
|
if isinstance(timestamp, datetime):
|
1654
1681
|
timestamp = int(timestamp.timestamp())
|
@@ -1751,8 +1778,8 @@ class Bot(BaseBot):
|
|
1751
1778
|
timestamp: Optional[Union[int, datetime]] = None,
|
1752
1779
|
) -> PostGroupMessagesReturn:
|
1753
1780
|
# tmp fix. content must not be none if sending media
|
1754
|
-
if media is not None and not content:
|
1755
|
-
|
1781
|
+
# if media is not None and not content:
|
1782
|
+
# content = " "
|
1756
1783
|
|
1757
1784
|
if isinstance(timestamp, datetime):
|
1758
1785
|
timestamp = int(timestamp.timestamp())
|
nonebot/adapters/qq/compat.py
CHANGED
@@ -8,7 +8,7 @@ if PYDANTIC_V2:
|
|
8
8
|
from pydantic import field_validator as field_validator
|
9
9
|
from pydantic import model_validator as model_validator
|
10
10
|
else:
|
11
|
-
from pydantic import
|
11
|
+
from pydantic import root_validator, validator
|
12
12
|
|
13
13
|
@overload
|
14
14
|
def model_validator(*, mode: Literal["before"]): ...
|
nonebot/adapters/qq/config.py
CHANGED
nonebot/adapters/qq/event.py
CHANGED
@@ -1,28 +1,33 @@
|
|
1
|
-
from enum import Enum
|
2
1
|
from datetime import datetime
|
2
|
+
from enum import Enum
|
3
|
+
from typing import Optional, TypeVar, cast
|
3
4
|
from typing_extensions import override
|
4
|
-
from typing import TypeVar, Optional, cast
|
5
|
-
|
6
|
-
from nonebot.utils import escape_tag
|
7
5
|
|
8
6
|
from nonebot.adapters import Event as BaseEvent
|
7
|
+
from nonebot.utils import escape_tag
|
9
8
|
|
10
9
|
from .message import Message
|
11
|
-
from .models import Message as GuildMessage
|
12
|
-
from .models import Post, User, Guild, Reply, Member, Thread, Channel
|
13
10
|
from .models import (
|
14
|
-
RichText,
|
15
|
-
QQMessage,
|
16
11
|
AudioAction,
|
12
|
+
ButtonInteraction,
|
13
|
+
Channel,
|
14
|
+
ForumAuditResult,
|
15
|
+
ForumSourceInfo,
|
17
16
|
FriendAuthor,
|
18
|
-
|
17
|
+
GroupMemberAuthor,
|
18
|
+
Guild,
|
19
|
+
Member,
|
19
20
|
MessageAudited,
|
20
|
-
|
21
|
+
MessageDelete,
|
21
22
|
MessageReaction,
|
22
|
-
|
23
|
-
|
24
|
-
|
23
|
+
Post,
|
24
|
+
QQMessage,
|
25
|
+
Reply,
|
26
|
+
RichText,
|
27
|
+
Thread,
|
28
|
+
User,
|
25
29
|
)
|
30
|
+
from .models import Message as GuildMessage
|
26
31
|
|
27
32
|
E = TypeVar("E", bound="Event")
|
28
33
|
|
nonebot/adapters/qq/exception.py
CHANGED
@@ -2,11 +2,11 @@ import json
|
|
2
2
|
from typing import Optional
|
3
3
|
|
4
4
|
from nonebot.drivers import Response
|
5
|
-
from nonebot.exception import AdapterException
|
6
5
|
from nonebot.exception import ActionFailed as BaseActionFailed
|
6
|
+
from nonebot.exception import AdapterException
|
7
|
+
from nonebot.exception import ApiNotAvailable as BaseApiNotAvailable
|
7
8
|
from nonebot.exception import NetworkError as BaseNetworkError
|
8
9
|
from nonebot.exception import NoLogException as BaseNoLogException
|
9
|
-
from nonebot.exception import ApiNotAvailable as BaseApiNotAvailable
|
10
10
|
|
11
11
|
from .store import audit_result
|
12
12
|
|
nonebot/adapters/qq/message.py
CHANGED
@@ -1,27 +1,26 @@
|
|
1
|
-
import
|
1
|
+
from collections.abc import Iterable
|
2
|
+
from dataclasses import dataclass
|
2
3
|
from io import BytesIO
|
3
4
|
from pathlib import Path
|
4
|
-
|
5
|
-
from
|
5
|
+
import re
|
6
|
+
from typing import TYPE_CHECKING, Optional, TypedDict, Union, overload
|
6
7
|
from typing_extensions import Self, override
|
7
|
-
from typing import TYPE_CHECKING, Union, Optional, TypedDict, overload
|
8
|
-
|
9
|
-
from nonebot.compat import type_validate_python
|
10
8
|
|
11
9
|
from nonebot.adapters import Message as BaseMessage
|
12
10
|
from nonebot.adapters import MessageSegment as BaseMessageSegment
|
11
|
+
from nonebot.compat import type_validate_python
|
13
12
|
|
14
|
-
from .models import QQMessage
|
15
|
-
from .utils import escape, unescape
|
16
|
-
from .models import Message as GuildMessage
|
17
13
|
from .models import Attachment as QQAttachment
|
14
|
+
from .models import Message as GuildMessage
|
18
15
|
from .models import (
|
19
16
|
MessageArk,
|
20
17
|
MessageEmbed,
|
21
18
|
MessageKeyboard,
|
22
19
|
MessageMarkdown,
|
23
20
|
MessageReference,
|
21
|
+
QQMessage,
|
24
22
|
)
|
23
|
+
from .utils import escape, unescape
|
25
24
|
|
26
25
|
|
27
26
|
class MessageSegment(BaseMessageSegment["Message"]):
|
@@ -1,15 +1,15 @@
|
|
1
|
-
from .qq import * # noqa: F403
|
2
|
-
from .guild import * # noqa: F403
|
3
1
|
from .common import * # noqa: F403
|
2
|
+
from .guild import * # noqa: F403
|
3
|
+
from .payload import Dispatch as Dispatch
|
4
|
+
from .payload import Heartbeat as Heartbeat
|
5
|
+
from .payload import HeartbeatAck as HeartbeatAck
|
4
6
|
from .payload import Hello as Hello
|
7
|
+
from .payload import Identify as Identify
|
8
|
+
from .payload import InvalidSession as InvalidSession
|
5
9
|
from .payload import Opcode as Opcode
|
6
|
-
from .payload import Resume as Resume
|
7
10
|
from .payload import Payload as Payload
|
8
|
-
from .payload import Dispatch as Dispatch
|
9
|
-
from .payload import Identify as Identify
|
10
|
-
from .payload import Heartbeat as Heartbeat
|
11
|
-
from .payload import Reconnect as Reconnect
|
12
11
|
from .payload import PayloadType as PayloadType
|
13
|
-
from .payload import
|
12
|
+
from .payload import Reconnect as Reconnect
|
13
|
+
from .payload import Resume as Resume
|
14
14
|
from .payload import WebhookVerify as WebhookVerify
|
15
|
-
from .
|
15
|
+
from .qq import * # noqa: F403
|
@@ -1,14 +1,14 @@
|
|
1
|
-
import json
|
2
|
-
from enum import IntEnum
|
3
1
|
from datetime import datetime
|
4
|
-
from
|
2
|
+
from enum import IntEnum
|
3
|
+
import json
|
4
|
+
from typing import Generic, Optional, TypeVar, Union
|
5
5
|
|
6
6
|
from pydantic import BaseModel
|
7
|
-
from nonebot.compat import PYDANTIC_V2, model_fields, type_validate_python
|
8
7
|
|
9
8
|
from nonebot.adapters.qq.compat import field_validator, model_validator
|
9
|
+
from nonebot.compat import PYDANTIC_V2, model_fields, type_validate_python
|
10
10
|
|
11
|
-
from .common import MessageArk, MessageEmbed, MessageReference
|
11
|
+
from .common import MessageArk, MessageAttachment, MessageEmbed, MessageReference
|
12
12
|
|
13
13
|
if PYDANTIC_V2:
|
14
14
|
GenericModel = BaseModel
|
@@ -363,7 +363,7 @@ class Paragraph(BaseModel):
|
|
363
363
|
|
364
364
|
|
365
365
|
class RichText(BaseModel):
|
366
|
-
paragraphs: list[Paragraph]
|
366
|
+
paragraphs: Optional[list[Paragraph]] = None
|
367
367
|
|
368
368
|
|
369
369
|
class ThreadObjectInfo(BaseModel):
|
@@ -1,8 +1,9 @@
|
|
1
1
|
from enum import IntEnum
|
2
|
+
from typing import Annotated, Optional, Union
|
2
3
|
from typing_extensions import Literal
|
3
|
-
from typing import Union, Optional, Annotated
|
4
4
|
|
5
|
-
from pydantic import
|
5
|
+
from pydantic import BaseModel, Field
|
6
|
+
|
6
7
|
from nonebot.compat import PYDANTIC_V2, ConfigDict
|
7
8
|
|
8
9
|
PAYLOAD_FIELD_ALIASES = {"opcode": "op", "data": "d", "sequence": "s", "type": "t"}
|
nonebot/adapters/qq/models/qq.py
CHANGED
nonebot/adapters/qq/utils.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
from functools import partial
|
2
1
|
from collections.abc import Awaitable
|
3
|
-
from
|
4
|
-
from typing import TYPE_CHECKING, Any,
|
2
|
+
from functools import partial
|
3
|
+
from typing import TYPE_CHECKING, Any, Callable, Generic, Optional, TypeVar, overload
|
4
|
+
from typing_extensions import Concatenate, ParamSpec
|
5
5
|
|
6
6
|
from nonebot.utils import logger_wrapper
|
7
7
|
|
@@ -0,0 +1,20 @@
|
|
1
|
+
nonebot/adapters/qq/__init__.py,sha256=aP8RG7Y_wCS8E30yLWOr4hSYyixer7C5LBnyqdjavjU,815
|
2
|
+
nonebot/adapters/qq/adapter.py,sha256=OUuKhGUQ3TgVjkhzA7a39N-T73a7BgXin6WHeuRdjGw,21245
|
3
|
+
nonebot/adapters/qq/bot.py,sha256=yln5z1FUHHGhPRNtEy6T1gTC4nAXXeakj6OJEaTqhE0,62493
|
4
|
+
nonebot/adapters/qq/compat.py,sha256=QBojrzvgK00k4SLC9GpKURphlvpAQcEdx3-fz8hw72o,767
|
5
|
+
nonebot/adapters/qq/config.py,sha256=qerp2JvAa9IhyRs2zL_mrRd3wHwz_Y7sd7S4VxNarFs,1975
|
6
|
+
nonebot/adapters/qq/event.py,sha256=7mA3NAUAKw5Jx1BKi73SEx1lXdWRg8CGQoPQmIHpP5M,18810
|
7
|
+
nonebot/adapters/qq/exception.py,sha256=c95BG6HP3fzcqB5L5929SP0JXAg8cgWe3VpWOrqlm38,2701
|
8
|
+
nonebot/adapters/qq/message.py,sha256=5bhV5IM1Ysecfft9n05pwFUHi0HPA65-jQgM0EOdRSs,15600
|
9
|
+
nonebot/adapters/qq/models/__init__.py,sha256=FI1eIUr1eW2dSPFXd50iuDldJ04srrnUu4ayOJ360rI,631
|
10
|
+
nonebot/adapters/qq/models/common.py,sha256=cezEiVnFvjswPlejdB46xH5PK2LIAzzbJi79KxpBjlA,4539
|
11
|
+
nonebot/adapters/qq/models/guild.py,sha256=hv89v3t8qGxWeWE6skb0-RBBsrkyOtVIdLlFWh3ekX0,11703
|
12
|
+
nonebot/adapters/qq/models/payload.py,sha256=aFv2kCOzeFBvL7jcRxW8hQvUgsEc81qg4jJtAN_jDdQ,3262
|
13
|
+
nonebot/adapters/qq/models/qq.py,sha256=PoMaFssKKAsaXkEG_50qBP-wDIU7qxRjriHVD07rfVE,1931
|
14
|
+
nonebot/adapters/qq/permission.py,sha256=DlBamFoVNDBRazpju-EgWruvKgYiTPq-p2PK4lapXeg,989
|
15
|
+
nonebot/adapters/qq/store.py,sha256=GKVbto6K7jI-oK9tSbw_xLxDiSA6Y9QnNQStKJU7mEY,868
|
16
|
+
nonebot/adapters/qq/utils.py,sha256=z1PkoweAk-nbYPdLlZz3LPCusjuj2ZqlaWvE6M0xeb0,1538
|
17
|
+
nonebot_adapter_qq-1.6.4.dist-info/LICENSE,sha256=4EZBnkZPQYBvtO2KFGaUQHTO8nZ26pGeaCFchdBq_AE,1064
|
18
|
+
nonebot_adapter_qq-1.6.4.dist-info/METADATA,sha256=SiXZC3XTAF6nlSNxOqYq04YIswPUx61QPj1uKkf_uQo,3395
|
19
|
+
nonebot_adapter_qq-1.6.4.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
20
|
+
nonebot_adapter_qq-1.6.4.dist-info/RECORD,,
|
@@ -1,20 +0,0 @@
|
|
1
|
-
nonebot/adapters/qq/__init__.py,sha256=jm1QxHfhcYIrWhkXxF9gE4G3lkagrLCWsmVqKBTQSOw,815
|
2
|
-
nonebot/adapters/qq/adapter.py,sha256=UwAjO168oWmvb3frjay4CTC54xq3hsCiVbeFxRwaGxI,21243
|
3
|
-
nonebot/adapters/qq/bot.py,sha256=dU84L8bjg3DWb5B8f_pX9xS5Y7dY8dL0mM-bHFl_3vg,61735
|
4
|
-
nonebot/adapters/qq/compat.py,sha256=Fr96IgBHHiEqGm8DVmlTekuaNdI5EPxti7J7HDwOHwg,767
|
5
|
-
nonebot/adapters/qq/config.py,sha256=YRVpGNvslGcNHNbbFN9LOjZ98-yon5x9GMF98FVJ2xo,1974
|
6
|
-
nonebot/adapters/qq/event.py,sha256=3A78iz-G6wC-KsW5gYQM16veqgCtjWWsb8AysXhDOK4,18802
|
7
|
-
nonebot/adapters/qq/exception.py,sha256=8Xa9NwYyO7Ih0owBAC_zmEiIRAA8GjgQcoJcF5ogo0g,2701
|
8
|
-
nonebot/adapters/qq/message.py,sha256=74H7L3FTpZu5GAm4j3wnVYf7wJQ_kP9HHjqaXn3uRTQ,15616
|
9
|
-
nonebot/adapters/qq/models/__init__.py,sha256=q2OhopcTn0UD2wuep_86dXMVhF_wQBzBDhyGLN1q0OE,631
|
10
|
-
nonebot/adapters/qq/models/common.py,sha256=Hoot6Qr3PGj13G4Cz2Eyr-liaLiJXBpxpeM59IXBri0,4539
|
11
|
-
nonebot/adapters/qq/models/guild.py,sha256=uKvSijWFMJ0x26Gd04b8QbUr8IOIn3U3m1d-I6xTrcI,11686
|
12
|
-
nonebot/adapters/qq/models/payload.py,sha256=IhAx2W5rN8ihg2NchQ9rJMfcxDecwnnJ-5_N-ky8deM,3261
|
13
|
-
nonebot/adapters/qq/models/qq.py,sha256=JH-1tC7ujwHpuJtPefGOJh2NQjrxAL7L-aRyu7xqplU,1931
|
14
|
-
nonebot/adapters/qq/permission.py,sha256=Jw00btklCMviP001MBlLQmqThb9OsjJwHO1nTEDFRWM,989
|
15
|
-
nonebot/adapters/qq/store.py,sha256=GKVbto6K7jI-oK9tSbw_xLxDiSA6Y9QnNQStKJU7mEY,868
|
16
|
-
nonebot/adapters/qq/utils.py,sha256=bzJwm1zWyHjFILr-bHrBKpKlkiveph9S4pLAXMcW9AY,1538
|
17
|
-
nonebot_adapter_qq-1.6.2.dist-info/LICENSE,sha256=4EZBnkZPQYBvtO2KFGaUQHTO8nZ26pGeaCFchdBq_AE,1064
|
18
|
-
nonebot_adapter_qq-1.6.2.dist-info/METADATA,sha256=x4uMaiMSnl-yCX16FWdRuCTzm9XeUroid3HmDTPX_oc,3395
|
19
|
-
nonebot_adapter_qq-1.6.2.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
20
|
-
nonebot_adapter_qq-1.6.2.dist-info/RECORD,,
|
File without changes
|