LiteyukiBot/docs/dev/api/plugin/model.md

66 lines
894 B
Markdown
Raw Normal View History

2024-08-19 01:43:46 +00:00
---
title: liteyuki.plugin.model
order: 1
icon: laptop-code
category: API
---
### ***class*** `PluginType(Enum)`
插件类型枚举值
2024-08-19 01:55:47 +00:00
###   ***attr*** `APPLICATION: 'application'`
2024-08-19 01:43:46 +00:00
2024-08-19 01:55:47 +00:00
###   ***attr*** `SERVICE: 'service'`
2024-08-19 01:43:46 +00:00
2024-08-19 01:55:47 +00:00
###   ***attr*** `IMPLEMENTATION: 'implementation'`
2024-08-19 01:43:46 +00:00
2024-08-19 01:55:47 +00:00
###   ***attr*** `MODULE: 'module'`
2024-08-19 01:43:46 +00:00
2024-08-19 01:55:47 +00:00
###   ***attr*** `UNCLASSIFIED: 'unclassified'`
2024-08-19 01:43:46 +00:00
### ***class*** `PluginMetadata(BaseModel)`
轻雪插件元数据由插件编写者提供name为必填项
2024-08-19 01:55:47 +00:00
2024-08-19 01:43:46 +00:00
Attributes:
2024-08-19 01:55:47 +00:00
2024-08-19 01:43:46 +00:00
----------
2024-08-19 01:55:47 +00:00
2024-08-19 01:43:46 +00:00
name: str
2024-08-19 01:55:47 +00:00
2024-08-19 01:43:46 +00:00
插件名称
2024-08-19 01:55:47 +00:00
2024-08-19 01:43:46 +00:00
description: str
2024-08-19 01:55:47 +00:00
2024-08-19 01:43:46 +00:00
插件描述
2024-08-19 01:55:47 +00:00
2024-08-19 01:43:46 +00:00
usage: str
2024-08-19 01:55:47 +00:00
2024-08-19 01:43:46 +00:00
插件使用方法
2024-08-19 01:55:47 +00:00
2024-08-19 01:43:46 +00:00
type: str
2024-08-19 01:55:47 +00:00
2024-08-19 01:43:46 +00:00
插件类型
2024-08-19 01:55:47 +00:00
2024-08-19 01:43:46 +00:00
author: str
2024-08-19 01:55:47 +00:00
2024-08-19 01:43:46 +00:00
插件作者
2024-08-19 01:55:47 +00:00
2024-08-19 01:43:46 +00:00
homepage: str
2024-08-19 01:55:47 +00:00
2024-08-19 01:43:46 +00:00
插件主页
2024-08-19 01:55:47 +00:00
2024-08-19 01:43:46 +00:00
extra: dict[str, Any]
2024-08-19 01:55:47 +00:00
2024-08-19 01:43:46 +00:00
额外信息
### ***class*** `Plugin(BaseModel)`
存储插件信息
2024-08-19 01:55:47 +00:00
###   ***attr*** `model_config: {'arbitrary_types_allowed': True}`
2024-08-19 01:43:46 +00:00