Skip to content

Commit 8775247

Browse files
committed
fix: add error checking
1 parent 7c69884 commit 8775247

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ plugins {
77
}
88

99
group = "com.github.samarium150"
10-
version = "1.2"
10+
version = "1.3"
1111

1212
repositories {
1313
mavenLocal()

src/main/kotlin/Lolicon.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ object Lolicon: CompositeCommand(
126126
sendMessage("非法属性")
127127
return
128128
}
129+
if (setting != 0 || setting != 1 || setting != 2) {
130+
sendMessage("非法属性")
131+
return
132+
}
129133
PluginData.customR18Groups[(subject as Group).id] = setting
130134
sendMessage("设置成功")
131135
}

src/main/kotlin/Main.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import net.mamoe.mirai.utils.info
2626
object Main: KotlinPlugin(
2727
JvmPluginDescription(
2828
id = "com.github.samarium150.mirai-console-lolicon",
29-
version = "1.2",
29+
version = "1.3",
3030
name = "mirai-console-lolicon"
3131
)
3232
) {

0 commit comments

Comments
 (0)