更新Mirai依赖到2.16.0

优化正则表达式匹配条件
This commit is contained in:
2025-03-01 00:14:01 +08:00
parent e6c476f948
commit d5132d587c
2 changed files with 4 additions and 4 deletions

View File

@ -3,11 +3,11 @@ plugins {
kotlin("jvm") version kotlinVersion
kotlin("plugin.serialization") version kotlinVersion
id("net.mamoe.mirai-console") version "2.15.0"
id("net.mamoe.mirai-console") version "2.16.0"
}
group = "top.jie65535"
version = "0.2.0"
version = "0.3.0"
repositories {
maven("https://maven.aliyun.com/repository/public")

View File

@ -13,12 +13,12 @@ object JDice : KotlinPlugin(
JvmPluginDescription(
id = "top.jie65535.dice",
name = "J Dice",
version = "0.2.0",
version = "0.3.0",
) {
author("jie65535")
}
) {
private val regex = Regex("""\b(\d{0,3})[dD]([1-9]\d{0,2})\b""")
private val regex = Regex("""(?<!\S)(\d{0,3})[dD]([1-9]\d{0,2})(?!\S)""")
private val random = Random(System.currentTimeMillis())
override fun onEnable() {