Skip to content

Commit 6799000

Browse files
authored
fix(#10): change r18 setting logic
1 parent 629775f commit 6799000

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
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.4.2"
10+
version = "1.4.3"
1111

1212
repositories {
1313
mavenLocal()

src/main/kotlin/Lolicon.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,11 @@ object Lolicon: CompositeCommand(
154154
try {
155155
setting = value.toInt()
156156
} catch (e: NumberFormatException) {
157-
sendMessage("非法属性")
157+
sendMessage("${value}不是有效的数字")
158158
return
159159
}
160-
if (setting != 0 || setting != 1 || setting != 2) {
161-
sendMessage("非法属性")
160+
if (setting != 0 && setting != 1 && setting != 2) {
161+
sendMessage("设置的数字无效")
162162
return
163163
}
164164
PluginData.customR18Groups[(subject as Group).id] = setting

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.4.2",
29+
version = "1.4.3",
3030
name = "mirai-console-lolicon"
3131
)
3232
) {

0 commit comments

Comments
 (0)