mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-09 01:30:17 +08:00
Check bot for isContextIdenticalWith
This commit is contained in:
parent
eda578ec87
commit
074236ceda
@ -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
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user