mirror of
https://github.com/jie65535/mirai-console-jhr-plugin.git
synced 2025-06-02 17:39:16 +08:00
增加 占位符设置检测
This commit is contained in:
parent
0553f6a584
commit
88058c743c
@ -291,6 +291,10 @@ object JHorseRacing : KotlinPlugin(
|
||||
if (event.isBlank()) {
|
||||
return@subscribeAlways
|
||||
}
|
||||
if (event.indexOf('?') == -1) {
|
||||
subject.sendMessage("请使用'?'作为占位符")
|
||||
return@subscribeAlways
|
||||
}
|
||||
if (JHRPluginConfig.goodEvents.indexOf(event) == -1) {
|
||||
JHRPluginConfig.goodEvents.add(event)
|
||||
logger.info("已增加好事件'$event'")
|
||||
@ -302,6 +306,10 @@ object JHorseRacing : KotlinPlugin(
|
||||
if (event.isBlank()) {
|
||||
return@subscribeAlways
|
||||
}
|
||||
if (event.indexOf('?') == -1) {
|
||||
subject.sendMessage("请使用'?'作为占位符")
|
||||
return@subscribeAlways
|
||||
}
|
||||
if (JHRPluginConfig.badEvents.indexOf(event) == -1) {
|
||||
JHRPluginConfig.badEvents.add(event)
|
||||
logger.info("已增加坏事件'$event'")
|
||||
@ -313,6 +321,10 @@ object JHorseRacing : KotlinPlugin(
|
||||
if (event.isBlank()) {
|
||||
return@subscribeAlways
|
||||
}
|
||||
if (event.indexOf('?') == -1) {
|
||||
subject.sendMessage("请使用'?'作为占位符")
|
||||
return@subscribeAlways
|
||||
}
|
||||
if (JHRPluginConfig.winnerMessage.indexOf(event) == -1) {
|
||||
JHRPluginConfig.winnerMessage.add(event)
|
||||
logger.info("已增加胜利词'$event'")
|
||||
|
Loading…
Reference in New Issue
Block a user