Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

适配 PicMenu 插件 #51

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

适配 PicMenu 插件 #51

wants to merge 2 commits into from

Conversation

CUZNIL
Copy link

@CUZNIL CUZNIL commented Mar 21, 2023

https://github.com/hamo-reid/nonebot_plugin_PicMenu 适配了这个插件,如有装载该插件即可通过菜单查看指令。

image

@OYBQAI%AN70}$NS0DRWA

BFAX{IN9F1_QUQ $GW2B1MD

%VAA4A_6Z6Z8K6NC~O R 1R

@monsterxcn
Copy link
Owner

monsterxcn commented Mar 22, 2023

好!非常棒!辛苦了。

但是我觉得侵入式的帮助写法不太美观,另外 PluginMetadata extra 这里的内容,是不是只有 PicMenu 这个插件能识别?我希望如果适配的话可以像 monsterxcn/nonebot-plugin-gscode#5 类似,只保留 PluginMetadata 里通用的字段比如 name description usage 等,尽量简短。

我去看了下 PicMenu 的 README,它提供了一种编写独立的 menu_config/menus/[需配置菜单的插件名].json 文件的适配方法,我不知道如果插件里有 PluginMetadataname description usage、同时还有额外的 [需配置菜单的插件名].json 时,这个 PicMenu 表现如何?如果能正常使用的话我希望你能这样改改:__init__.py 只保留 PluginMetadataname description usage 等通用字段,extra 等非通用字段放入 menu_config/menus/nonebot-plugin-gspanel.json

@monsterxcn monsterxcn changed the title 适配Picmenu插件 适配 PicMenu 插件 Mar 22, 2023
@CUZNIL
Copy link
Author

CUZNIL commented Mar 22, 2023

好!非常棒!辛苦了。

但是我觉得侵入式的帮助写法不太美观,另外 PluginMetadata extra 这里的内容,是不是只有 PicMenu 这个插件能识别?我希望如果适配的话可以像 monsterxcn/nonebot-plugin-gscode#5 类似,只保留 PluginMetadata 里通用的字段比如 name description usage 等,尽量简短。

我去看了下 PicMenu 的 README,它提供了一种适配方法是编写独立的 menu_config/menus/[需配置菜单的插件名].json 文件来适配,我不知道如果插件里有 PluginMetadataname description usage、同时还有额外的 [需配置菜单的插件名].json 时,这个 PicMenu 表现如何?如果能正常使用的话我希望你能这样改改:__init__.py 只保留 PluginMetadataname description usage 等通用字段,extra 等非通用字段放入 menu_config/menus/nonebot-plugin-gspanel.json

主要放在menu_config/menus/nonebot-plugin-gspanel.json里的话 我也不知道该怎么在这里改了
F `{8}6HUOOASB2C8J3%MPN

是不是只有 PicMenu 这个插件能识别我也不太清楚,我就依葫芦画瓢,没研究过nonebot插件该怎么写。

@monsterxcn
Copy link
Owner

你先确定一下我说这种做法能不能正常使用吧:

  • __init__.py 仅保留 PluginMetadataname description usage 等通用字段
  • menu_config/menus/nonebot-plugin-gspanel.json 写入 PluginMetadataextra 等非通用字段

确定可行的话在这个仓库新建对应文件即可,文件夹结构大概像下面这样:

.
├─.github
│  ├─ISSUE_TEMPLATE
│  └─workflows
├─.vscode
├─data
│  └─gspanel
│      ├─font
│      └─imgs
├─menu_config
│  └─menus
├─nonebot_plugin_gspanel

@CUZNIL
Copy link
Author

CUZNIL commented Mar 28, 2023

你先确定一下我说这种做法能不能正常使用吧:

  • __init__.py 仅保留 PluginMetadataname description usage 等通用字段
  • menu_config/menus/nonebot-plugin-gspanel.json 写入 PluginMetadataextra 等非通用字段

确定可行的话在这个仓库新建对应文件即可,文件夹结构大概像下面这样:

.
├─.github
│  ├─ISSUE_TEMPLATE
│  └─workflows
├─.vscode
├─data
│  └─gspanel
│      ├─font
│      └─imgs
├─menu_config
│  └─menus
├─nonebot_plugin_gspanel

image
不行 搞不来
我不知道该怎么在menu_config/menus/nonebot-plugin-gspanel.json里获取GSPANEL_ALIAS,也不知道该怎么在json里拼接字符串

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants