mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-09 18:00:33 +08:00
update
This commit is contained in:
parent
4ca1884831
commit
9e3b0661da
@ -1,6 +1,7 @@
|
||||
package net.mamoe.mirai.message;
|
||||
|
||||
/**
|
||||
* @author LamGC
|
||||
* @author Him188moe
|
||||
*/
|
||||
public enum FaceID {
|
||||
|
@ -41,7 +41,7 @@ class LoginSession(
|
||||
|
||||
|
||||
/**
|
||||
* 发送一个数据包, 并期待接受一个特定的 [ServerPacket]. 仅 Kotlin 使用
|
||||
* 发送一个数据包, 并期待接受一个特定的 [ServerPacket].
|
||||
* 发送成功后, 该方法会等待收到 [ServerPacket] 直到超时.
|
||||
*
|
||||
* 实现方法:
|
||||
|
@ -4,6 +4,8 @@ import net.mamoe.mirai.contact.Group
|
||||
import net.mamoe.mirai.contact.QQ
|
||||
import net.mamoe.mirai.event.events.group.GroupMessageEvent
|
||||
import net.mamoe.mirai.event.events.qq.FriendMessageEvent
|
||||
import net.mamoe.mirai.getGroupByNumber
|
||||
import net.mamoe.mirai.getQQ
|
||||
import net.mamoe.mirai.message.defaults.MessageChain
|
||||
import net.mamoe.mirai.network.LoginSession
|
||||
import net.mamoe.mirai.network.packet.ServerFriendMessageEventPacket
|
||||
@ -33,7 +35,7 @@ class MessagePacketHandler(session: LoginSession) : PacketHandler(session) {
|
||||
is ServerFriendMessageEventPacket -> {
|
||||
if (ignoreMessage) return
|
||||
|
||||
FriendMessageEvent(session.bot, session.bot.contacts.getQQ(packet.qq), packet.message).broadcast()
|
||||
FriendMessageEvent(session.bot, session.bot.getQQ(packet.qq), packet.message).broadcast()
|
||||
}
|
||||
|
||||
is ServerGroupMessageEventPacket -> {
|
||||
@ -41,7 +43,7 @@ class MessagePacketHandler(session: LoginSession) : PacketHandler(session) {
|
||||
|
||||
if (packet.qq == session.bot.account.qqNumber) return
|
||||
|
||||
GroupMessageEvent(session.bot, session.bot.contacts.getGroupByNumber(packet.groupNumber), session.bot.contacts.getQQ(packet.qq), packet.message).broadcast()
|
||||
GroupMessageEvent(session.bot, session.bot.getGroupByNumber(packet.groupNumber), session.bot.getQQ(packet.qq), packet.message).broadcast()
|
||||
}
|
||||
|
||||
is ServerSendFriendMessageResponsePacket,
|
||||
|
Loading…
Reference in New Issue
Block a user