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
99507835
Commit
99507835
authored
Jun 19, 2020
by
Him188
Committed by
GitHub
Jun 19, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #379 from EricTianC/patch-1
Update guide_getting_started.md
parents
854e2e8c
6990a2ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
docs/guide_getting_started.md
docs/guide_getting_started.md
+6
-3
No files found.
docs/guide_getting_started.md
View file @
99507835
...
...
@@ -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 离线, 避免主线程退出
...
...
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