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-09-18 16:11:03 +08:00
|
|
|
|
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
|
2021-09-18 16:11:03 +08:00
|
|
|
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
|