nonebot2/nonebot/adapters/__init__.py

35 lines
833 B
Python
Raw Normal View History

2022-01-20 14:49:46 +08:00
"""本模块定义了协议适配基类,各协议请继承以下基类。
2022-01-20 14:49:46 +08:00
使用 {ref}`nonebot.drivers.Driver.register_adapter` 注册适配器
"""
2021-02-19 15:24:52 +08:00
from typing import Iterable
2020-07-11 17:32:03 +08:00
try:
import pkg_resources
pkg_resources.declare_namespace(__name__)
del pkg_resources
except ImportError:
import pkgutil
__path__: Iterable[str] = pkgutil.extend_path(__path__, __name__) # type: ignore
del pkgutil
except Exception:
pass
from ._bot import Bot as Bot
from ._event import Event as Event
2021-12-06 22:19:05 +08:00
from ._adapter import Adapter as Adapter
from ._message import Message as Message
from ._message import MessageSegment as MessageSegment
2021-09-27 00:19:30 +08:00
from ._template import MessageTemplate as MessageTemplate
2022-01-17 15:06:53 +08:00
__autodoc__ = {
"_bot": True,
"_event": True,
"_adapter": True,
"_message": True,
"_template": True,
}