Skip to content
This repository has been archived by the owner on Jan 8, 2023. It is now read-only.

Commit

Permalink
优化
Browse files Browse the repository at this point in the history
  • Loading branch information
Nambers committed Jun 13, 2021
1 parent d8f3f36 commit d0b8fb8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 3 additions & 3 deletions build.gradle.kts
@@ -1,12 +1,12 @@
plugins {
val kotlinVersion = "1.4.31"
val kotlinVersion = "1.5.10"
kotlin("jvm") version kotlinVersion
kotlin("plugin.serialization") version kotlinVersion
id("net.mamoe.mirai-console") version "2.6.2"
id("net.mamoe.mirai-console") version "2.6.5"
}

group = "tech.Eritque_arcus"
version = "1.2.0"
version = "1.3.0"

repositories {
mavenCentral()
Expand Down
8 changes: 7 additions & 1 deletion src/main/kotlin/PluginMain.kt
Expand Up @@ -21,7 +21,7 @@ object PluginMain : KotlinPlugin(
JvmPluginDescription(
id = "tech.eritquearcus.TuLingBot",
name = "TuLingBot",
version = "1.2.0"
version = "1.3.0"
)
) {
private var apikey = ""
Expand All @@ -45,6 +45,12 @@ object PluginMain : KotlinPlugin(
logger.info("配置文件目录 \"${dataFolder.absolutePath}\"")
if(!file.exists()){
logger.error("配置文件不存在(路径:${file.absolutePath}),无法正常使用本插件")
file.createNewFile()
file.writeText("{\n" +
"\"apikey\":\"api令牌\",\n" +
"\"gkeyword\":\"群聊触发开始字符\",\n" +
"\"fkeyword\":\"私聊触发开始字符\"\n" +
"}")
return
}
val config = file.readText()
Expand Down

0 comments on commit d0b8fb8

Please sign in to comment.