yoimiya-kokomi / miao-plugin Goto Github PK
View Code? Open in Web Editor NEWMiao-Plugin for Yunzai-Bot
License: MIT License
Miao-Plugin for Yunzai-Bot
License: MIT License
有偿的也行啊
请求面板时好时坏,坏的时候手动访问网址是没有问题的,但是依旧无法读取,而且坏的频率很高,发现其他群友也普遍有这样的问题。
具体报错如下:
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'
}
qq: "", // 申请的主人qq
token: "11" // 申请的token
这两个信息怎么填呀
每次使用 #老婆
命令,就会增加20mb左右的内存占用
1.7.9之前版本是对的
由于查他人的伤害时uid紧跟指令,中间没有间隔符,导致无法查除了第一个伤害外的伤害。
如查询达达利亚的断流斩伤害:#达达利亚伤害212345678,2与uid会被统一识别成uid
请问如何申请角色面板查询的token,想使用这个功能
大佬,bot群怎么进啊QWQ!我想申请api的!
比如限制多少秒可以请求一次
或者多少秒撤回发送得图片
不然极其容易引起刷屏影响正常交流
安装插件后,查询角色卡片等不需要私人ck的功能,提示暂未配置公共查询,但是在yunzai config文件里面已经配置了ck,这个插件如果不配置私人ck,就没有办法使用吗?
备注:
1.确定yunzai config文件有效,因为在装这个插件之前,一直是用那个ck查询的。
2.还有一个很奇怪的现象,可能有助于排查问题,我装完插件后,使用机器人管理员的账号查询#老婆指令,发现它提示“暂未配置公共查询”,于是我使用用户统计功能,发现图片提示ck失效,在我确认其他机器人均可以使用这个ck(即不是ck问题)的情况下,我使用重置用户统计,原来失效的ck变得有效,但是机器人管理员进行查询时,机器人会返回两个信息,一个是米游社接口错误,另一个就是返回过来正确的角色图片。但是其他群成员查询同样会显示暂未配置公共查询。
我的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)] 请求失败
na那个token怎么申请啊
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的,请大佬看看是什么问题
是纯图片,不是resource/character-img里面那个
重做了服务器系统以后,设置公共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)
这边了解到查询面板的token不发放的原因是服务器压力问题,那请问可否发布这个查询面板的方法,大家自己看看能否有条件部署使用。
群友在查询烟绯面板的时候,后台报错无法返回消息
错误日志如下
[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|
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
}
}
请问是否可以在不绑定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
大佬这个报错是什么情况
请问Miao Api Token如何申请
centos7.4启动的时候moment函数报错,安装momentjs也安装不了,有老哥知道怎么解决吗(≖_≖ )
您好,我在bot本体中找到了一个名称为token,但是没有后缀的文档,不知道是不是这个(而且我打开之后也都是乱码)如果是的话怎么查看啊,或者怎么申请一个token(
是否可以让未绑定cookie的用户使用查询面板功能(通过enka的api)
[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)] 请求失败
有的时候可以更新,但是更多的时候请求失败?
提示
请求失败:请求错误,请稍后重试
直接访问提示
Not Found
日历这个功能太好用了,是否可以让机器人每日定时发布日历
我根据教程在安卓上的Termux部署了yunzai的bot,我想把喵喵插件也放进去,可以把插件解压之后放进安卓插件文件夹里吗?感谢!
[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)
重新获取一次后正常。
期间米游社没有其他登录、退出的操作。(第二天网页依然是登录状态,可以直接F12获取ck)
喵喵更新至最新(1.8.6)发生#喵喵更新-可一直更新,并没有提示以达到最新无法更新。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.