Update napcat-types to 0.0.11 and improve config API

Upgraded napcat-types dependency from 0.0.10 to 0.0.11. Refactored the API URL config option to use the new signature supporting reactivity directly, improving code clarity and maintainability.
This commit is contained in:
手瓜一十雪
2026-01-29 21:01:52 +08:00
parent e37300c380
commit 8883f600ad
3 changed files with 7 additions and 7 deletions

View File

@@ -38,7 +38,7 @@ const plugin_init: PluginModule['plugin_init'] = async (ctx) => {
ctx.NapCatConfig.text('prefix', 'Command Prefix', '#napcat', 'The prefix to trigger the version info command'),
ctx.NapCatConfig.boolean('enableReply', 'Enable Reply', true, 'Switch to enable or disable the reply functionality'),
// 代表监听 apiUrl 字段的变化
{ ...ctx.NapCatConfig.text('apiUrl', 'API URL', '', 'Enter an API URL to load available endpoints'), reactive: true },
ctx.NapCatConfig.text('apiUrl', 'API URL', '', 'Enter an API URL to load available endpoints', true),
ctx.NapCatConfig.select('theme', 'Theme Selection', [
{ label: 'Light Mode', value: 'light' },
{ label: 'Dark Mode', value: 'dark' },

View File

@@ -7,7 +7,7 @@
"description": "NapCat 内置插件",
"author": "NapNeko",
"dependencies": {
"napcat-types": "0.0.10"
"napcat-types": "0.0.11"
},
"devDependencies": {
"@types/node": "^22.0.1"