Check bot for isContextIdenticalWith

This commit is contained in:
Him188 2020-03-21 02:18:44 +08:00
parent eda578ec87
commit 074236ceda

View File

@ -198,8 +198,9 @@ abstract class MessagePacketBase<TSender : QQ, TSubject : Contact> : Packet, Bot
/**
* 判断两个 [MessagePacket] [MessagePacket.sender] [MessagePacket.subject] 是否相同
*/
@SinceMirai("0.29.0")
fun MessagePacket<*, *>.isContextIdenticalWith(another: MessagePacket<*, *>): Boolean {
return this.sender == another.sender && this.subject == another.subject
return this.sender == another.sender && this.subject == another.subject && this.bot == another.bot
}
/**