mirror of
https://github.com/jie65535/JDice.git
synced 2025-06-02 17:39:11 +08:00
更新Mirai依赖到2.15.0
修复返回null的问题
This commit is contained in:
parent
66f8798528
commit
e6c476f948
@ -1,13 +1,13 @@
|
|||||||
plugins {
|
plugins {
|
||||||
val kotlinVersion = "1.7.10"
|
val kotlinVersion = "1.8.10"
|
||||||
kotlin("jvm") version kotlinVersion
|
kotlin("jvm") version kotlinVersion
|
||||||
kotlin("plugin.serialization") 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"
|
group = "top.jie65535"
|
||||||
version = "0.1.2"
|
version = "0.2.0"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven("https://maven.aliyun.com/repository/public")
|
maven("https://maven.aliyun.com/repository/public")
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
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
|
distributionPath=wrapper/dists
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
@ -13,12 +13,12 @@ object JDice : KotlinPlugin(
|
|||||||
JvmPluginDescription(
|
JvmPluginDescription(
|
||||||
id = "top.jie65535.dice",
|
id = "top.jie65535.dice",
|
||||||
name = "J Dice",
|
name = "J Dice",
|
||||||
version = "0.1.2",
|
version = "0.2.0",
|
||||||
) {
|
) {
|
||||||
author("jie65535")
|
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())
|
private val random = Random(System.currentTimeMillis())
|
||||||
|
|
||||||
override fun onEnable() {
|
override fun onEnable() {
|
||||||
@ -37,7 +37,7 @@ object JDice : KotlinPlugin(
|
|||||||
} else {
|
} else {
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
}.joinToString().let {
|
}.filter{ it != null }.joinToString().let {
|
||||||
if (it.isNotEmpty())
|
if (it.isNotEmpty())
|
||||||
subject.sendMessage(message.quote() + it)
|
subject.sendMessage(message.quote() + it)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user