mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-19 07:14:43 +08:00
update readme
This commit is contained in:
parent
1823efd59e
commit
a9650ede27
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
#### 事件 Hook (Kotlin)
|
#### 事件 Hook (Kotlin)
|
||||||
#####java:
|
#####java:
|
||||||
```php
|
```
|
||||||
MiraiEventHook.onEvent(FriendMessageEvent.class)
|
MiraiEventHook.onEvent(FriendMessageEvent.class)
|
||||||
.handler(a -> {
|
.handler(a -> {
|
||||||
if(a.getMessageString().equals("你好"))
|
if(a.getMessageString().equals("你好"))
|
||||||
@ -24,7 +24,7 @@ MiraiEventHook.onEvent(FriendMessageEvent.class)
|
|||||||
.mountAlways();
|
.mountAlways();
|
||||||
```
|
```
|
||||||
#####kotlin:
|
#####kotlin:
|
||||||
```php
|
```
|
||||||
FriendMessageEvent::class.hookAlways{
|
FriendMessageEvent::class.hookAlways{
|
||||||
if(it.message() valueEquals "你好")
|
if(it.message() valueEquals "你好")
|
||||||
it.qq.sendMessage("你好!")
|
it.qq.sendMessage("你好!")
|
||||||
|
Loading…
Reference in New Issue
Block a user