mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-17 19:40:44 +00:00
✨ Feature: 添加插件元数据字段 type
homepage
supported_adapters
(#2012)
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
from nonebot.adapters import Adapter
|
||||
from nonebot.plugin import PluginMetadata
|
||||
|
||||
|
||||
@ -7,10 +8,17 @@ class Config(BaseModel):
|
||||
custom: str = ""
|
||||
|
||||
|
||||
class FakeAdapter(Adapter):
|
||||
...
|
||||
|
||||
|
||||
__plugin_meta__ = PluginMetadata(
|
||||
name="测试插件",
|
||||
description="测试插件元信息",
|
||||
usage="无法使用",
|
||||
type="application",
|
||||
homepage="https://v2.nonebot.dev",
|
||||
config=Config,
|
||||
supported_adapters={"~onebot.v11", "plugins.metadata:FakeAdapter"},
|
||||
extra={"author": "NoneBot"},
|
||||
)
|
||||
|
Reference in New Issue
Block a user