Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Mirai
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Mirai
Commits
69bb4232
Commit
69bb4232
authored
Feb 20, 2020
by
Him188
Committed by
GitHub
Feb 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update guide_getting_started.md
parent
abc2c83d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
docs/guide_getting_started.md
docs/guide_getting_started.md
+3
-4
No files found.
docs/guide_getting_started.md
View file @
69bb4232
...
...
@@ -53,7 +53,7 @@ JDK要求6以上
}
```
-
添加依赖,将dependencies部分覆盖
`mirai-core`
的最新版本为:
[

](https://bintray.com/him188moe/mirai/mirai-core/)
-
添加依赖,将dependencies部分覆盖
。
`mirai-core`
的最新版本为:
[

](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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment