Pre Merge pull request !148 from Admilk/master
This commit is contained in:
commit
7e1266ba89
|
@ -2,9 +2,12 @@ import plugin from '../../lib/plugins/plugin.js'
|
||||||
export class newcomer extends plugin {
|
export class newcomer extends plugin {
|
||||||
constructor () {
|
constructor () {
|
||||||
super({
|
super({
|
||||||
|
/** 插件名字 */
|
||||||
name: '欢迎新人',
|
name: '欢迎新人',
|
||||||
|
/** 插件描述 */
|
||||||
dsc: '新人入群欢迎',
|
dsc: '新人入群欢迎',
|
||||||
/** https://oicqjs.github.io/oicq/#events */
|
/** https://oicqjs.github.io/oicq/#events */
|
||||||
|
/** 插件触发事件 */
|
||||||
event: 'notice.group.increase',
|
event: 'notice.group.increase',
|
||||||
priority: 5000
|
priority: 5000
|
||||||
})
|
})
|
||||||
|
|
|
@ -15,7 +15,7 @@ export class setPubCk extends plugin {
|
||||||
priority: 700,
|
priority: 700,
|
||||||
rule: [
|
rule: [
|
||||||
{
|
{
|
||||||
reg: "^#配置(ck|cookie)$|^#*配置公共查询ck$",
|
reg: /^#配置c(oo)?k(ie)?$|^#*配置公共查询c(oo)?k(ie)?$/i,
|
||||||
fnc: "setPubCk",
|
fnc: "setPubCk",
|
||||||
permission: "master"
|
permission: "master"
|
||||||
},
|
},
|
||||||
|
|
|
@ -20,7 +20,7 @@ export class user extends plugin {
|
||||||
fnc: 'ckCode'
|
fnc: 'ckCode'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
reg: '^#绑定[Cc](oo)?[Kk](ie)?$',
|
reg: /^#绑定c(oo)?k(ie)?$/i,
|
||||||
fnc: 'bingCk'
|
fnc: 'bingCk'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -29,28 +29,28 @@ export class user extends plugin {
|
||||||
fnc: 'noLogin'
|
fnc: 'noLogin'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
reg: '^#?(原神|星铁)?我的[Cc](oo)?[Kk](ie)?$',
|
reg: /^#?(原神|星铁)?我的c(oo)?k(ie)?$/i,
|
||||||
event: 'message',
|
event: 'message',
|
||||||
fnc: 'myCk'
|
fnc: 'myCk'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
reg: '^#?(原神|星铁)?删除[Cc](oo)?[Kk](ie)?$',
|
reg: /^#?(原神|星铁)?删除c(oo)?k(ie)?$/i,
|
||||||
fnc: 'delCk'
|
fnc: 'delCk'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
reg: '^#?(原神|星铁)?(删除|解绑)(uid|UID)\\s*[0-9]{1,2}$',
|
reg: /^#?(原神|星铁)?(删除|解绑)uid\\s*[0-9]{1,2}$/i,
|
||||||
fnc: 'delUid'
|
fnc: 'delUid'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
reg: '^#(原神|星铁)?绑定(uid|UID)?\\s*([1-9]|18)[0-9]{8}$',
|
reg: /^#(原神|星铁)?绑定(uid)?\\s*([1-9]|18)[0-9]{8}$/i,
|
||||||
fnc: 'bingUid'
|
fnc: 'bingUid'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
reg: '^#(原神|星铁)?(我的)?(uid|UID)[0-9]{0,2}$',
|
reg: /^#(原神|星铁)?(我的)?(uid)[0-9]{0,2}$/i,
|
||||||
fnc: 'showUid'
|
fnc: 'showUid'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
reg: '^#\\s*(检查|我的)*[Cc](oo)?[Kk](ie)?(状态)*$',
|
reg: /^#\\s*(检查|我的)*c(oo)?k(ie)?(状态)*$/i,
|
||||||
fnc: 'checkCkStatus'
|
fnc: 'checkCkStatus'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -85,13 +85,13 @@ export class user extends plugin {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.e.msg == "#绑定uid" || this.e.msg == "#绑定UID") {
|
if (this.e.msg.toLowerCase() === "#绑定uid") {
|
||||||
this.setContext("saveUid")
|
this.setContext("saveUid")
|
||||||
this.reply("请发送绑定的原神uid", false, { at: true })
|
this.reply("请发送绑定的原神uid", false, { at: true })
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.e.msg == "#星铁绑定uid" || this.e.msg == "#星铁绑定UID") {
|
if (this.e.msg.toLowerCase() === "#星铁绑定uid") {
|
||||||
this.setContext("saveSrUid")
|
this.setContext("saveSrUid")
|
||||||
this.reply("请发送绑定的星铁uid", false, { at: true })
|
this.reply("请发送绑定的星铁uid", false, { at: true })
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in New Issue