mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-16 11:00:54 +00:00
✨ Feature: 添加插件元信息定义 (#1046)
This commit is contained in:
16
tests/plugins/metadata.py
Normal file
16
tests/plugins/metadata.py
Normal file
@ -0,0 +1,16 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
from nonebot.plugin import PluginMetadata
|
||||
|
||||
|
||||
class Config(BaseModel):
|
||||
custom: str = ""
|
||||
|
||||
|
||||
__plugin_meta__ = PluginMetadata(
|
||||
name="测试插件",
|
||||
description="测试插件元信息",
|
||||
usage="无法使用",
|
||||
config=Config,
|
||||
extra={"author": "NoneBot"},
|
||||
)
|
Reference in New Issue
Block a user