Update guide_getting_started.md

This commit is contained in:
Him188 2020-02-20 21:06:30 +08:00 committed by GitHub
parent abc2c83d80
commit 69bb4232d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,7 +53,7 @@ JDK要求6以上
}
```
- 添加依赖将dependencies部分覆盖 `mirai-core` 的最新版本为: [![Download](https://api.bintray.com/packages/him188moe/mirai/mirai-core/images/download.svg)](https://bintray.com/him188moe/mirai/mirai-core/)
- 添加依赖将dependencies部分覆盖 `mirai-core` 的最新版本为: [![Download](https://api.bintray.com/packages/him188moe/mirai/mirai-core/images/download.svg)](https://bintray.com/him188moe/mirai/mirai-core/)
```groovy
dependencies {
@ -84,7 +84,7 @@ import net.mamoe.mirai.event.subscribeMessages
suspend fun main() {
val qqId = 10000L//Bot的QQ号需为Long类型在结尾处添加大写L
val password = "your_password"//Bot的密码
val miraiBot = Bot(qqId, password).alsoLogin()//新建Bot并登
val miraiBot = Bot(qqId, password).alsoLogin()//新建Bot并登
miraiBot.subscribeMessages {
"你好" reply "你好!"
case("at me") {
@ -95,7 +95,7 @@ suspend fun main() {
"刘老板太强了".reply()
}
}
miraiBot.join()
miraiBot.join() // 等待 Bot 离线, 避免主线程退出
}
```
@ -110,7 +110,6 @@ suspend fun main() {
### 此外还可以使用Maven作为包管理工具
本项目推荐使用gradle因此不提供详细入门指导
Kotlin 在 Maven 上只支持 JVM 平台.
```xml
<repositories>
<repository>