This commit is contained in:
Him188 2019-09-30 00:06:28 +08:00
parent 4ca1884831
commit 9e3b0661da
3 changed files with 6 additions and 3 deletions

View File

@ -1,6 +1,7 @@
package net.mamoe.mirai.message;
/**
* @author LamGC
* @author Him188moe
*/
public enum FaceID {

View File

@ -41,7 +41,7 @@ class LoginSession(
/**
* 发送一个数据包, 并期待接受一个特定的 [ServerPacket]. Kotlin 使用
* 发送一个数据包, 并期待接受一个特定的 [ServerPacket].
* 发送成功后, 该方法会等待收到 [ServerPacket] 直到超时.
*
* 实现方法:

View File

@ -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,