Coder Social home page Coder Social logo

miao-plugin's Introduction

Miao-Plugin 说明

miao-plugin是一个Yunzai-Bot的升级插件,提供包括角色面板、角色查询等角色相关功能。

具体功能可在安装插件后 通过 #喵喵帮助 进行查看。如需进行设置则可通过 #喵喵设置 命令进行管理。


安装与更新

使用Git安装(推荐)

请将 miao-plugin 放置在 Yunzai-Bot 的 plugins 目录下,重启 Yunzai-Bot 后即可使用。

请使用 git 进行安装,以方便后续升级。在 Yunzai-Bot 根目录夹打开终端,运行下述指令之一

// 使用gitee
git clone --depth=1 https://gitee.com/yoimiya-kokomi/miao-plugin.git ./plugins/miao-plugin/
pnpm install -P

// 使用github
git clone --depth=1 https://github.com/yoimiya-kokomi/miao-plugin.git ./plugins/miao-plugin/
pnpm install -P

进行安装。安装完毕后,管理员只需发送 #喵喵更新 即可自动更新 miao-plugin。

手工下载安装(不推荐)

手工下载安装包,解压后将miao-plugin-master更名为miao-plugin,然后放置在Yunzai的plugins目录内

虽然此方式能够使用,但无法使用#喵喵更新进行更新,不利于后续升级,故不推荐使用


Yunzai版本与支持

miao-plugin 支持V3 / V2 版本的Yunzai-Bot

  • Miao-Yunzai : 喵版Yunzai Gitee / Github ,本体不含签到功能,功能迭代较多,与miao-plugin打通,只建议新部署/迁移
  • Yunzai-V3 :Yunzai V3 - 喵喵维护版,icqq版本,与原版Yunza功能基本一致,会保持卡池更新,功能相对稳定,可从原版Yunzai换源直接升级
  • Yunzai-V3 :Yunzai V3 - 乐神原版,oicq版本,可能会遇到登录问题

功能说明

#雷神面板

使用指令 #面板帮助 即可了解如何使用此功能。

#更新面板

#更新面板 依赖于面板查询API,面板服务由 http://enka.network/ 提供。

查询功能经Enka官方授权(issue#63),感谢Enka提供的面板查询服务

如果可以的话,也请在Patreon上支持Enka,或提供闲置的原神账户,具体可在Enka官网 Discord联系

issue#63

可尝试使用MiniGG-Api面板服务 @MiniGrayGay
发送 #喵喵设置面板服务332 修改国服&B服的面板查询由 MiniGG-Api 处理

#雷神伤害

喵喵面板附带的伤害计算功能由喵喵本地计算。如计算有偏差 #雷神伤害 查看伤害加成信息,如确认伤害计算有误可提供伤害录屏截图及uid进行反馈

#雷神圣遗物

圣遗物评分为喵喵版评分规则


在有一定阅读理解能力基础下,建议阅读 CHANGELOG.md 以了解更多内容。

其余文档咕咕咕中


免责声明

  1. miao-plugin自身的UI与代码均开放,无需征得特殊同意,可任意使用。能备注来源最好,但不强求
  2. 以上声明但仅代表miao-plugin自身的范畴,请尊重Yunzai本体及其他插件作者的努力,勿将Yunzai及其他插件用于以盈利为目的的场景
  3. miao-plugin的图片与其他素材均来自于网络,仅供交流学习使用,如有侵权请联系,会立即删除

资源

其他&感谢

  • Enka.Network: 感谢Enka提供的面板服务
  • Snap.Hutao : 感谢 DGP Studio 开发的 胡桃 API
  • QQ群(暂时停止新加入,请见谅)
    • Yunzai-Bot 官方QQ群:213938015
    • 喵喵Miao-Plugin QQ群:607710456
  • 爱发电 :欢迎老板打赏,喵~

miao-plugin's People

Contributors

1-4134-5386-4941 avatar 1umine avatar alexteamx avatar algoinde avatar ashenashes avatar ctrlcvs avatar cuznil avatar fafa1875963496 avatar ikechan8370 avatar jkl8753 avatar kaguramaisakuya avatar kickoutfromqqgroup avatar lcroof avatar liangshi233 avatar mikezom avatar minigraygay avatar panganqi avatar prussianbluecn avatar sanqianqvq avatar sirlydreamer avatar sjlei avatar smallk111407 avatar story-x avatar timerainstarsky avatar touchscale avatar veritasalex avatar yangwei549 avatar yoimiya-kokomi avatar yury-21 avatar zm-j avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

miao-plugin's Issues

#角色伤害请求失败

image
查询#烟绯伤害、#云堇伤害 时看到以上报错,#面板、#养成等功能不受影响
目前只发现了烟绯和云堇有这个问题,没有排查所有的角色

moment函数报错

centos7.4启动的时候moment函数报错,安装momentjs也安装不了,有老哥知道怎么解决吗(≖_≖ )

尚未配置更新Api,无法更新数据~

发送:#雷神详情
答:尚无雷电将军的面板详情。请在将角色展示在【游戏内】的“角色展柜”中,并打开“显示角色详情”。设置完成5分钟后使用 #获取游戏角色详情 命令进行数据获取。
发送#获取游戏角色详情
答:尚未配置更新Api,无法更新数据~
image
文件复制到位,为何还是无法使用#角色面板

在设置好公共CK的情况下,极个别成员查看角色信息会报错

重做了服务器系统以后,设置公共CK,在所有人都没有绑定私人CK的情况下,绝大部分人能正常使用角色卡牌功能,极少数群员无法使用查询信息功能:如老婆,角色卡牌等,报错信息如下所示。

[2022-05-22T22:50:35.831] [MARK] command - [xxx] #角色卡片:character
[2022-05-22T22:50:35.834] [MARK] command - [xxx] #角色卡片:roleCard
[2022-05-22T22:50:35.836] [ERROR] error - mysInfo.roleCard
[2022-05-22T22:50:35.837] [ERROR] error - TypeError: cookieUser.getCookie is not a function
at Object.Msg.getMysApi (file:///C:/GenshinBot/Yunzai-Bot/lib/components/Msg.js:170:25)
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async GroupMessage.e.getMysApi (file:///C:/GenshinBot/Yunzai-Bot/lib/dealMsg.js:144:12)
at async getMysApi (file:///C:/GenshinBot/Yunzai-Bot/lib/app/mysInfo.js:122:10)
at async Module.roleCard (file:///C:/GenshinBot/Yunzai-Bot/lib/app/mysInfo.js:515:16)
at async Object.dealMsg (file:///C:/GenshinBot/Yunzai-Bot/lib/dealMsg.js:191:19)

查询角色伤害失败:SyntaxError: Unexpected end of JSON input

[2022-06-20T17:52:54.228] [ERROR] error - plugin_miao-plugin.character
[2022-06-20T17:52:54.230] [ERROR] error - SyntaxError: Unexpected end of JSON input
at JSON.parse ()
at Object._get (file:///home/wk/Yunzai-Bot/plugins/miao-plugin/components/Profile.js:111:23)
at Object.get (file:///home/wk/Yunzai-Bot/plugins/miao-plugin/components/Profile.js:120:24)
at renderProfile (file:///home/wk/Yunzai-Bot/plugins/miao-plugin/apps/character.js:749:31)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Object.dealMsg (file:///home/wk/Yunzai-Bot/lib/dealMsg.js:191:19)

查他人角色伤害的指令bug

由于查他人的伤害时uid紧跟指令,中间没有间隔符,导致无法查除了第一个伤害外的伤害。
如查询达达利亚的断流斩伤害:#达达利亚伤害212345678,2与uid会被统一识别成uid

查询特定角色的面板时后台报错

群友在查询烟绯面板的时候,后台报错无法返回消息
错误日志如下
[ERROR] error - plugin_miao-plugin.character
[ERROR] error - TemplateError: anonymous:74:5
72| {{each reliquaries ds}}
73|

74| {{if ds.name && ds.main && ds.main[0] && ds.main[0]!="undefined"}}
75|


76|
77| +{{ds.level}}

RuntimeError: Cannot read properties of undefined (reading 'name')

enka服务应该是正常的,查询别的角色好像没这个问题,初步分析是因为圣遗物没装全的问题。

手工调用enka服务返回的烟绯部分的json如下

{
"avatarId": 10000048,
"propMap": {
"1001": {
"type": 1001,
"ival": "0"
},
"1002": {
"type": 1002,
"ival": "5",
"val": "5"
},
"1003": {
"type": 1003,
"ival": "0"
},
"1004": {
"type": 1004,
"ival": "0"
},
"4001": {
"type": 4001,
"ival": "80",
"val": "80"
},
"10010": {
"type": 10010,
"ival": "24000",
"val": "24000"
}
},
"talentIdList": [
481,
482
],
"fightPropMap": {
"1": 8288.505859375,
"2": 537.75,
"3": 0.040800001472234726,
"4": 722.3115844726562,
"6": 0.6351000070571899,
"7": 520.1956787109375,
"8": 16.200000762939453,
"20": 0.08500000089406967,
"21": 0,
"22": 1.3542799949645996,
"23": 1,
"26": 0,
"27": 0,
"28": 79.25999450683594,
"29": 0,
"30": 0,
"40": 0.6460000276565552,
"41": 0,
"42": 0,
"43": 0,
"44": 0,
"45": 0,
"46": 0,
"50": 0,
"51": 0,
"52": 0,
"53": 0,
"54": 0,
"55": 0,
"56": 0,
"70": 80,
"1010": 9164.4267578125,
"2000": 9164.4267578125,
"2001": 1181.0516357421875,
"2002": 536.3956909179688,
"2003": 0
},
"skillDepotId": 4801,
"inherentProudSkillList": [
482101,
482201,
482301
],
"skillLevelMap": {
"10481": 8,
"10482": 5,
"10485": 4
},
"equipList": [
{
"itemId": 77553,
"reliquary": {
"level": 21,
"mainPropId": 10004,
"appendPropIdList": [
501241,
501224,
501203,
501031,
501244,
501241,
501223,
501244
]
},
"flat": {
"nameTextMapHash": "3195328356",
"setNameTextMapHash": "147298547",
"rankLevel": 5,
"reliquaryMainstat": {
"mainPropId": "FIGHT_PROP_ATTACK_PERCENT",
"statValue": 46.6
},
"reliquarySubstats": [
{
"appendPropId": "FIGHT_PROP_ELEMENT_MASTERY",
"statValue": 79
},
{
"appendPropId": "FIGHT_PROP_CRITICAL_HURT",
"statValue": 14.8
},
{
"appendPropId": "FIGHT_PROP_CRITICAL",
"statValue": 3.5
},
{
"appendPropId": "FIGHT_PROP_HP_PERCENT",
"statValue": 4.1
}
],
"itemType": "ITEM_RELIQUARY",
"icon": "UI_RelicIcon_15003_5",
"equipType": "EQUIP_SHOES"
}
},
{
"itemId": 94513,
"reliquary": {
"level": 21,
"mainPropId": 15008,
"appendPropIdList": [
501022,
501064,
501224,
501081,
501024,
501224,
501064,
501063
]
},
"flat": {
"nameTextMapHash": "3102891332",
"setNameTextMapHash": "2276480763",
"rankLevel": 5,
"reliquaryMainstat": {
"mainPropId": "FIGHT_PROP_FIRE_ADD_HURT",
"statValue": 46.6
},
"reliquarySubstats": [
{
"appendPropId": "FIGHT_PROP_HP",
"statValue": 538
},
{
"appendPropId": "FIGHT_PROP_ATTACK_PERCENT",
"statValue": 16.9
},
{
"appendPropId": "FIGHT_PROP_CRITICAL_HURT",
"statValue": 15.5
},
{
"appendPropId": "FIGHT_PROP_DEFENSE",
"statValue": 16
}
],
"itemType": "ITEM_RELIQUARY",
"icon": "UI_RelicIcon_15020_1",
"equipType": "EQUIP_RING"
}
},
{
"itemId": 14402,
"weapon": {
"level": 90,
"promoteLevel": 6,
"affixMap": {
"114402": 2
}
},
"flat": {
"nameTextMapHash": "1163263227",
"rankLevel": 4,
"weaponStats": [
{
"appendPropId": "FIGHT_PROP_BASE_ATTACK",
"statValue": 510
},
{
"appendPropId": "FIGHT_PROP_CRITICAL_HURT",
"statValue": 55.1
}
],
"itemType": "ITEM_WEAPON",
"icon": "UI_EquipIcon_Catalyst_Troupe"
}
}
],
"fetterInfo": {
"expLevel": 3
}
}

请求面板时好时坏

请求面板时好时坏,坏的时候手动访问网址是没有问题的,但是依旧无法读取,而且坏的频率很高,发现其他群友也普遍有这样的问题。
具体报错如下:
FetchError: request to https://enka.shinshin.moe/u/101408379/__data.json failed, reason: connect ETIMEDOUT 172.67.220.52:443
at ClientRequest. (file:///J:/bots/%E5%8E%9F%E7%A5%9E/Yunzai-Bot/node_modules/_node-fetch@3.2.5@node-fetch/src/index.js:108:11)
at ClientRequest.emit (node:events:520:28)
at TLSSocket.socketErrorListener (node:_http_client:442:9)
at TLSSocket.emit (node:events:520:28)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
type: 'system',
errno: 'ETIMEDOUT',
code: 'ETIMEDOUT',
erroredSysCall: 'connect'
}

更新面板请求失败

SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse ()
at Response.json (file:///G:/yuanshen%20bot/Yunzai-Bot/node_modules/_node-fe
tch@3.2.4@node-fetch/src/body.js:149:15)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Object.request (file:///G:/yuanshen%20bot/Yunzai-Bot/plugins/miao-p
lugin/components/profile-data/enka.js:14:16)
at async Object.request (file:///G:/yuanshen%20bot/Yunzai-Bot/plugins/miao-p
lugin/components/Profile.js:61:14)
at async Module.getProfile (file:///G:/yuanshen%20bot/Yunzai-Bot/plugins/mia
o-plugin/apps/character/profile-common.js:185:14)
at async Object.dealMsg (file:///G:/yuanshen%20bot/Yunzai-Bot/lib/dealMsg.js
:193:19)
[2022-07-04T23:36:16.343] [INFO] succeed to send: [Group(887823552)] 请求失败

前几天还可以正常更新面板,没做任何改动这几天更新就失败了,猜测是没有收到 JSON 格式的数据,大概率查询后接收到的是 HTML 的数据,根据实际情况判断是大概率因为连接enka api失败 (或者说被墙了?) 然后接受到 html 404 的数据,尝试一下直连 https://enka.shinshin.moe/ 该网页是OK的,请大佬看看是什么问题

是否可以在不绑定ck的情况下,直接通过api传来的数据获取装备信息

请问是否可以在不绑定ck的情况下,直接通过api传来的数据获取装备信息。

现在似乎不绑定ck,就没办法使用那个通过api查询到的装备属性详情,请问有办法不绑定ck,直接通过api那边穿过路的数据,生成那种装备属性图吗?

主要是我那个机器人不想开cookie功能,怕群里面有人因为自己的原因账号出问题找机器人的麻烦

十分感谢。

重启提示

报错:miao-plugin
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'moment' imported from /root/Yunzai-Bot/plugins/miao-plugin/components/Calcendar.js

大佬这个报错是什么情况

token

na那个token怎么申请啊

#喵喵更新

喵喵更新至最新(1.8.6)发生#喵喵更新-可一直更新,并没有提示以达到最新无法更新。

关于token不发放

这边了解到查询面板的token不发放的原因是服务器压力问题,那请问可否发布这个查询面板的方法,大家自己看看能否有条件部署使用。

更新面板-请求失败?

[2022-06-21T13:29:52.508] [INFO] recv from: [Private: xxxxxxxxxx(friend)] #更新
面板
[2022-06-21T13:29:52.509] [MARK] [私聊][xxxxxxxxxxx] #更新面板:character
[2022-06-21T13:29:52.511] [MARK] [私聊][xxxxxxxxxxx] #更新面板:getProfile
[2022-06-21T13:29:52.740] [INFO] succeed to send: [Private(xxxxxxxxxx)] 开始获取数据,可能会需要一定时间~
FetchError: request to https://enka.shinshin.moe/u/xxxxxxxxx/__data.json failed,
reason: connect ETIMEDOUT 104.21.78.99:443
at ClientRequest. (file:///D:/Yunzai-Bot/node_modules/_node-fetch@3.2.6@node-fetch/src/index.js:108:11)
at ClientRequest.emit (node:events:527:28)
at TLSSocket.socketErrorListener (node:_http_client:454:9)
at TLSSocket.emit (node:events:527:28)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
type: 'system',
errno: 'ETIMEDOUT',
code: 'ETIMEDOUT',
erroredSysCall: 'connect'
}
[2022-06-21T13:30:14.762] [INFO] succeed to send: [Private(xxxxxxxxxx)] 请求失败

有的时候可以更新,但是更多的时候请求失败?

安装插件后,查询角色卡片等不需要私人ck的功能,提示错误

安装插件后,查询角色卡片等不需要私人ck的功能,提示暂未配置公共查询,但是在yunzai config文件里面已经配置了ck,这个插件如果不配置私人ck,就没有办法使用吗?
备注:
1.确定yunzai config文件有效,因为在装这个插件之前,一直是用那个ck查询的。
2.还有一个很奇怪的现象,可能有助于排查问题,我装完插件后,使用机器人管理员的账号查询#老婆指令,发现它提示“暂未配置公共查询”,于是我使用用户统计功能,发现图片提示ck失效,在我确认其他机器人均可以使用这个ck(即不是ck问题)的情况下,我使用重置用户统计,原来失效的ck变得有效,但是机器人管理员进行查询时,机器人会返回两个信息,一个是米游社接口错误,另一个就是返回过来正确的角色图片。但是其他群成员查询同样会显示暂未配置公共查询。

miao插件无法更新面板

我的bot与朋友的bot同时出现无法更新面板的问题,且保证之前正常运行。目前暂未测试其他功能,疑似mhy修改的相关数据接口或接口异常,望查证~

错误log:

[2022-06-20T23:16:37.262] [INFO] message - recv from: [Group: 派蒙desu、(), Member: ()
] #更新面板
[2022-06-20T23:16:37.264] [MARK] command - [派蒙desu、] #更新面板:character
[2022-06-20T23:16:37.265] [MARK] command - [派蒙desu、] #更新面板:getProfile
[2022-06-20T23:16:37.402] [INFO] message - succeed to send: [Group(606128251)] 开始获取数据,可能会需要一定时间~
SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse ()
at Response.json (file:/Yuzaibot/Yunzai-Bot/node_modules/_node-fetch@3.2.6@node-fet
ch/src/body.js:149:15)
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Object.request (file:/Yuzaibot/Yunzai-Bot/plugins/miao-plugin/components/p
rofile/enka.js:14:16)
at async Object.request (file:/Yuzaibot/Yunzai-Bot/plugins/miao-plugin/components/P
rofile.js:61:14)
at async Module.getProfile (file:/Yuzaibot/Yunzai-Bot/plugins/miao-plugin/apps/char
acter.js:542:14)
at async Object.dealMsg (file:/Yuzaibot/Yunzai-Bot/lib/dealMsg.js:191:19)
[2022-06-20T23:16:38.955] [INFO] message - succeed to send: [Group(606128251)] 请求失败

token怎么查看啊

您好,我在bot本体中找到了一个名称为token,但是没有后缀的文档,不知道是不是这个(而且我打开之后也都是乱码)如果是的话怎么查看啊,或者怎么申请一个token(

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.