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
4b4fd3b9
Commit
4b4fd3b9
authored
Sep 11, 2019
by
Him188moe
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
15de6f31
3eeb981b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
README.md
README.md
+4
-4
No files found.
README.md
View file @
4b4fd3b9
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
我们坚持免费与开源
我们坚持免费与开源
项目处于快速开发阶段
项目处于快速开发阶段
协议来自网络上开源项目
部分
协议来自网络上开源项目
一切开发旨在学习, 请勿用于非法用途
一切开发旨在学习, 请勿用于非法用途
## 抢先体验
## 抢先体验
...
@@ -13,8 +13,8 @@
...
@@ -13,8 +13,8 @@
2.
Import as Maven project
2.
Import as Maven project
3.
Run
[
MiraiMain
](
mirai-core/src/main/java/net/mamoe/mirai/MiraiMain.java#L7
)
3.
Run
[
MiraiMain
](
mirai-core/src/main/java/net/mamoe/mirai/MiraiMain.java#L7
)
### 事件 Hook
(Kotlin)
### 事件 Hook
####
j
ava:
####
J
ava:
```
```
MiraiEventHook.onEvent(FriendMessageEvent.class)
MiraiEventHook.onEvent(FriendMessageEvent.class)
.handler(a -> {
.handler(a -> {
...
@@ -23,7 +23,7 @@ MiraiEventHook.onEvent(FriendMessageEvent.class)
...
@@ -23,7 +23,7 @@ MiraiEventHook.onEvent(FriendMessageEvent.class)
})
})
.mountAlways();
.mountAlways();
```
```
####
k
otlin:
####
K
otlin:
```
```
FriendMessageEvent::class.hookAlways{
FriendMessageEvent::class.hookAlways{
if(it.message() valueEquals "你好")
if(it.message() valueEquals "你好")
...
...
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