This commit is contained in:
Him188 2020-01-18 22:28:53 +08:00
parent 1f2d7e229f
commit 0d505e5111
3 changed files with 5 additions and 2 deletions

View File

@ -5,4 +5,4 @@ import net.mamoe.mirai.data.LoginResult
class LoginFailedException(
val result: LoginResult,
message: String = "Login failed with reason $result"
) : Exception(message)
) : RuntimeException(message)

View File

@ -63,7 +63,7 @@ suspend fun main() {
*
* @see MessageSubscribersBuilder
*/
suspend fun Bot.messageDSL() {
fun Bot.messageDSL() {
// 监听这个 bot 的来自所有群和好友的消息
this.subscribeMessages {
// 当接收到消息 == "你好" 时就回复 "你好!"

View File

@ -32,6 +32,9 @@ dependencies {
api(project(":mirai-console"))
runtimeOnly(files("../mirai-core/build/classes/kotlin/jvm/main")) // classpath is not added correctly by IDE
implementation(group = 'com.alibaba', name = 'fastjson', version = '1.2.62')
implementation("org.jsoup:jsoup:1.12.1")
api(kotlin("stdlib", kotlinVersion))
api(kotlinx("io-jvm", kotlinXIoVersion))
api(kotlinx("io", kotlinXIoVersion))