nonebot2/nonebot/plugin/__init__.py

19 lines
514 B
Python
Raw Normal View History

2020-10-18 15:04:45 +08:00
"""
插件
====
NoneBot 插件开发提供便携的定义函数
"""
2020-06-30 10:13:58 +08:00
2021-11-08 01:02:35 +08:00
from typing import Optional
from contextvars import ContextVar
2021-11-08 01:02:35 +08:00
_current_plugin: ContextVar[Optional["Plugin"]] = ContextVar("_current_plugin",
default=None)
2020-06-30 10:13:58 +08:00
2021-11-08 01:02:35 +08:00
from .export import Export as Export
from .export import export as export
2021-11-08 01:02:35 +08:00
from .plugin import Plugin as Plugin
from .plugin import get_plugin as get_plugin
from .plugin import get_loaded_plugins as get_loaded_plugins