更改大小写匹配

This commit is contained in:
Admilk 2024-02-25 20:39:09 +08:00
parent ca78e42bbe
commit 366524b144
3 changed files with 13 additions and 10 deletions

View File

@ -2,9 +2,12 @@ import plugin from '../../lib/plugins/plugin.js'
export class newcomer extends plugin {
constructor () {
super({
/** 插件名字 */
name: '欢迎新人',
/** 插件描述 */
dsc: '新人入群欢迎',
/** https://oicqjs.github.io/oicq/#events */
/** 插件触发事件 */
event: 'notice.group.increase',
priority: 5000
})

View File

@ -15,7 +15,7 @@ export class setPubCk extends plugin {
priority: 700,
rule: [
{
reg: "^#配置(ck|cookie)$|^#*配置公共查询ck$",
reg: /^#配置c(oo)?k(ie)?$|^#*配置公共查询c(oo)?k(ie)?$/i,
fnc: "setPubCk",
permission: "master"
},

View File

@ -20,7 +20,7 @@ export class user extends plugin {
fnc: 'ckCode'
},
{
reg: '^#绑定[Cc](oo)?[Kk](ie)?$',
reg: /^#绑定c(oo)?k(ie)?$/i,
fnc: 'bingCk'
},
{
@ -29,28 +29,28 @@ export class user extends plugin {
fnc: 'noLogin'
},
{
reg: '^#?(原神|星铁)?我的[Cc](oo)?[Kk](ie)?$',
reg: /^#?(原神|星铁)?我的c(oo)?k(ie)?$/i,
event: 'message',
fnc: 'myCk'
},
{
reg: '^#?(原神|星铁)?删除[Cc](oo)?[Kk](ie)?$',
reg: /^#?(原神|星铁)?(删除|解绑)(uid)\\s*[0-9]{1,2}$/i,
fnc: 'delCk'
},
{
reg: '^#?(原神|星铁)?(删除|解绑)(uid|UID)\\s*[0-9]{1,2}$',
reg: /^#?(原神|星铁)?(删除|解绑)uid\\s*[0-9]{1,2}$/i,
fnc: 'delUid'
},
{
reg: '^#(原神|星铁)?绑定(uid|UID)?\\s*([1-9]|18)[0-9]{8}$',
reg: /^#(原神|星铁)?绑定(uid)?\\s*([1-9]|18)[0-9]{8}$/i,
fnc: 'bingUid'
},
{
reg: '^#(原神|星铁)?(我的)?(uid|UID)[0-9]{0,2}$',
reg: /^#(原神|星铁)?(我的)?(uid)[0-9]{0,2}$/i,
fnc: 'showUid'
},
{
reg: '^#\\s*(检查|我的)*[Cc](oo)?[Kk](ie)?(状态)*$',
reg: /^#\\s*(检查|我的)*c(oo)?k(ie)?(状态)*$/i,
fnc: 'checkCkStatus'
},
{
@ -85,13 +85,13 @@ export class user extends plugin {
return true
}
if (this.e.msg == "#绑定uid" || this.e.msg == "#绑定UID") {
if (this.e.msg.toLowerCase() === "#绑定uid") {
this.setContext("saveUid")
this.reply("请发送绑定的原神uid", false, { at: true })
return true
}
if (this.e.msg == "#星铁绑定uid" || this.e.msg == "#星铁绑定UID") {
if (this.e.msg.toLowerCase() === "#星铁绑定uid") {
this.setContext("saveSrUid")
this.reply("请发送绑定的星铁uid", false, { at: true })
return true