diff --git a/build.gradle.kts b/build.gradle.kts index cc14bc3..5951f22 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,13 +1,13 @@ plugins { - val kotlinVersion = "1.7.10" + val kotlinVersion = "1.8.10" kotlin("jvm") version kotlinVersion kotlin("plugin.serialization") version kotlinVersion - id("net.mamoe.mirai-console") version "2.14.0" + id("net.mamoe.mirai-console") version "2.15.0" } group = "top.jie65535" -version = "0.1.2" +version = "0.2.0" repositories { maven("https://maven.aliyun.com/repository/public") diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 68f4317..9847e16 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-all.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME \ No newline at end of file diff --git a/src/main/kotlin/JDice.kt b/src/main/kotlin/JDice.kt index 179b42d..fbfa28c 100644 --- a/src/main/kotlin/JDice.kt +++ b/src/main/kotlin/JDice.kt @@ -13,12 +13,12 @@ object JDice : KotlinPlugin( JvmPluginDescription( id = "top.jie65535.dice", name = "J Dice", - version = "0.1.2", + version = "0.2.0", ) { author("jie65535") } ) { - private val regex = Regex("""\b(\d{0,3})[dD](\d{1,3})\b""") + private val regex = Regex("""\b(\d{0,3})[dD]([1-9]\d{0,2})\b""") private val random = Random(System.currentTimeMillis()) override fun onEnable() { @@ -37,7 +37,7 @@ object JDice : KotlinPlugin( } else { null } - }.joinToString().let { + }.filter{ it != null }.joinToString().let { if (it.isNotEmpty()) subject.sendMessage(message.quote() + it) }