Commit 99507835 authored by Him188's avatar Him188 Committed by GitHub

Merge pull request #379 from EricTianC/patch-1

Update guide_getting_started.md
parents 854e2e8c 6990a2ee
......@@ -56,7 +56,7 @@
```groovy
dependencies {
implementation 'net.mamoe:mirai-core-qqandroid:0.32.0'//此处版本应替换为当前最新
implementation 'net.mamoe:mirai-core-qqandroid:1.1-EA'//此处版本应替换为当前最新
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
testCompile group: 'junit', name: 'junit', version: '4.12'
}
......@@ -78,6 +78,9 @@ package net.mamoe.mirai.simpleloader
import kotlinx.coroutines.*
import net.mamoe.mirai.Bot
import net.mamoe.mirai.alsoLogin
import net.mamoe.mirai.join
import net.mamoe.mirai.message.data.At
import net.mamoe.mirai.contact.Member
import net.mamoe.mirai.event.subscribeMessages
suspend fun main() {
......@@ -87,11 +90,11 @@ suspend fun main() {
miraiBot.subscribeMessages {
"你好" reply "你好!"
case("at me") {
reply(sender.at() + " 给爷爬 ")
reply(At(sender as Member) + " 给爷爬 ")
}
(contains("舔") or contains("刘老板")) {
"刘老板太强了".reply()
reply("刘老板太强了")
}
}
miraiBot.join() // 等待 Bot 离线, 避免主线程退出
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment