mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-02-25 20:10:28 +08:00
commit
fb6e5a69f2
@ -1,22 +1,23 @@
|
|||||||
import httpx
|
|
||||||
import json
|
import json
|
||||||
import re
|
import re
|
||||||
|
from typing import TYPE_CHECKING, Any, Dict, Optional, Tuple, Union
|
||||||
|
|
||||||
from aiocache import cached, Cache
|
import httpx
|
||||||
|
from aiocache import Cache, cached
|
||||||
from aiocache.serializers import PickleSerializer
|
from aiocache.serializers import PickleSerializer
|
||||||
from typing import Any, Dict, Tuple, Union, Optional, TYPE_CHECKING
|
|
||||||
|
|
||||||
from nonebot.log import logger
|
|
||||||
from nonebot.typing import overrides
|
|
||||||
from nonebot.message import handle_event
|
|
||||||
from nonebot.adapters import Bot as BaseBot
|
from nonebot.adapters import Bot as BaseBot
|
||||||
from nonebot.drivers import Driver, HTTPRequest, HTTPResponse
|
from nonebot.drivers import Driver, HTTPRequest, HTTPResponse
|
||||||
|
from nonebot.log import logger
|
||||||
|
from nonebot.message import handle_event
|
||||||
|
from nonebot.typing import overrides
|
||||||
|
|
||||||
from .config import Config as FeishuConfig
|
from .config import Config as FeishuConfig
|
||||||
from .event import Event, GroupMessageEvent, MessageEvent, PrivateMessageEvent, Reply, get_event_model
|
from .event import (Event, GroupMessageEvent, MessageEvent,
|
||||||
|
PrivateMessageEvent, get_event_model)
|
||||||
from .exception import ActionFailed, ApiNotAvailable, NetworkError
|
from .exception import ActionFailed, ApiNotAvailable, NetworkError
|
||||||
from .message import Message, MessageSegment, MessageSerializer
|
from .message import Message, MessageSegment, MessageSerializer
|
||||||
from .utils import log, AESCipher
|
from .utils import AESCipher, log
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from nonebot.config import Config
|
from nonebot.config import Config
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import inspect
|
import inspect
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from typing import Any, Dict, List, Literal, Optional, Type
|
from typing import Any, Dict, List, Literal, Optional, Type
|
||||||
|
|
||||||
|
from pydantic import BaseModel, Field, root_validator
|
||||||
from pygtrie import StringTrie
|
from pygtrie import StringTrie
|
||||||
from pydantic import BaseModel, root_validator, Field
|
|
||||||
|
|
||||||
from nonebot.adapters import Event as BaseEvent
|
from nonebot.adapters import Event as BaseEvent
|
||||||
from nonebot.typing import overrides
|
from nonebot.typing import overrides
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from nonebot.exception import (AdapterException, ActionFailed as
|
from nonebot.exception import ActionFailed as BaseActionFailed
|
||||||
BaseActionFailed, NetworkError as
|
from nonebot.exception import AdapterException
|
||||||
BaseNetworkError, ApiNotAvailable as
|
from nonebot.exception import ApiNotAvailable as BaseApiNotAvailable
|
||||||
BaseApiNotAvailable)
|
from nonebot.exception import NetworkError as BaseNetworkError
|
||||||
|
|
||||||
|
|
||||||
class FeishuAdapterException(AdapterException):
|
class FeishuAdapterException(AdapterException):
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import json
|
|
||||||
import itertools
|
import itertools
|
||||||
|
import json
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from typing import Any, Dict, List, Optional, Tuple, Type, Union, Mapping, Iterable
|
from typing import (Any, Dict, Iterable, List, Mapping, Optional, Tuple, Type,
|
||||||
|
Union)
|
||||||
|
|
||||||
from nonebot.adapters import Message as BaseMessage, MessageSegment as BaseMessageSegment
|
from nonebot.adapters import Message as BaseMessage
|
||||||
|
from nonebot.adapters import MessageSegment as BaseMessageSegment
|
||||||
from nonebot.typing import overrides
|
from nonebot.typing import overrides
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@ import base64
|
|||||||
import hashlib
|
import hashlib
|
||||||
|
|
||||||
from Crypto.Cipher import AES
|
from Crypto.Cipher import AES
|
||||||
|
|
||||||
from nonebot.utils import logger_wrapper
|
from nonebot.utils import logger_wrapper
|
||||||
|
|
||||||
log = logger_wrapper("FEISHU")
|
log = logger_wrapper("FEISHU")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user