Merge pull request #275 from kaguramaisakuya/master

修复hoyolab未公开时报错,优化命令正则
This commit is contained in:
Ca(HCO₃)₂ 2023-10-09 22:07:00 +08:00 committed by GitHub
commit 30a8dfdac3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 12 additions and 11 deletions

1
.gitignore vendored
View File

@ -136,6 +136,7 @@ data/
config/test/* config/test/*
!config/test/default.yaml !config/test/default.yaml
logs/ logs/
resources/
# Docker file # Docker file
redis redis

View File

@ -17,7 +17,7 @@ export class exchange extends plugin {
fnc: 'getCode' fnc: 'getCode'
}, },
{ {
reg: '#(兑换码使用|cdk-u) .+', reg: '^#(兑换码使用|cdk-u) .+',
fnc: 'useCode' fnc: 'useCode'
} }
] ]

View File

@ -20,15 +20,15 @@ export class gcLog extends plugin {
fnc: 'logUrl' fnc: 'logUrl'
}, },
{ {
reg: '#txt日志文件导入记录', reg: '^#txt日志文件导入记录$',
fnc: 'logFile' fnc: 'logFile'
}, },
{ {
reg: '#xlsx文件导入记录', reg: '^#xlsx文件导入记录$',
fnc: 'logXlsx' fnc: 'logXlsx'
}, },
{ {
reg: '#json文件导入记录', reg: '^#json文件导入记录$',
fnc: 'logJson' fnc: 'logJson'
}, },
{ {

View File

@ -14,7 +14,7 @@ export class material extends plugin {
priority: 500, priority: 500,
rule: [ rule: [
{ {
reg: '#*(.*)(突破|材料|素材)$', reg: '^#*(.*)(突破|材料|素材)$',
fnc: 'material' fnc: 'material'
} }
] ]

View File

@ -27,7 +27,7 @@ export class mysNews extends plugin {
fnc: 'mysUrl' fnc: 'mysUrl'
}, },
{ {
reg: '#*原(石|神)(预估|盘点)$', reg: '^#*原(石|神)(预估|盘点)$',
fnc: 'ysEstimate' fnc: 'ysEstimate'
}, },
{ {

View File

@ -22,7 +22,7 @@ export class payLog extends plugin {
fnc: 'payLog' fnc: 'payLog'
}, },
{ {
reg: '^#?更新(充值|消费)(记录|统计)', reg: '^#?更新(充值|消费)(记录|统计)$',
fnc: 'updatePayLog' fnc: 'updatePayLog'
}, },
{ {
@ -31,7 +31,7 @@ export class payLog extends plugin {
fnc: 'getAuthKey' fnc: 'getAuthKey'
}, },
{ {
reg: '^#?(充值|消费)(记录|统计)帮助', reg: '^#?(充值|消费)(记录|统计)帮助$',
fnc: 'payLogHelp' fnc: 'payLogHelp'
} }
] ]

View File

@ -11,7 +11,7 @@ export class takeBirthdayPhoto extends plugin {
priority: 5000, priority: 5000,
rule: [ rule: [
{ {
reg: '#?(留影(叙佳期)?|((领)?((角色)?生日)(卡)?))$', reg: '^#?(留影(叙佳期)?|((领)?((角色)?生日)(卡)?))$',
fnc: 'birthdaystar' fnc: 'birthdaystar'
} }
] ]

View File

@ -133,9 +133,9 @@ export default class MysApi {
return false return false
} }
if (res.retcode !== 0 && this.option.log) { /* if (res.retcode !== 0 && this.option.log) {
logger.debug(`[米游社接口][请求参数] ${url} ${JSON.stringify(param)}`) logger.debug(`[米游社接口][请求参数] ${url} ${JSON.stringify(param)}`)
} } */
res.api = type res.api = type