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