mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-10 02:20:14 +08:00
Rename OperableEvent
to GroupOperableEvent
This commit is contained in:
parent
e86256fb39
commit
024bd23084
@ -120,7 +120,7 @@ sealed class MessageRecallEvent : BotEvent {
|
|||||||
override val messageId: Long,
|
override val messageId: Long,
|
||||||
override val messageTime: Int,
|
override val messageTime: Int,
|
||||||
/**
|
/**
|
||||||
* 操作人. 为 null 是
|
* 操作人. 为 null 时则为 [Bot] 操作.
|
||||||
*/
|
*/
|
||||||
override val operator: Member?,
|
override val operator: Member?,
|
||||||
override val group: Group
|
override val group: Group
|
||||||
|
@ -57,7 +57,7 @@ interface GroupMemberEvent : GroupEvent {
|
|||||||
* @see isByBot
|
* @see isByBot
|
||||||
* @see operatorOrBot
|
* @see operatorOrBot
|
||||||
*/
|
*/
|
||||||
interface OperableEvent : GroupEvent {
|
interface GroupOperableEvent : GroupEvent {
|
||||||
/**
|
/**
|
||||||
* 操作人, 为 `null` 时为 [Bot] 操作
|
* 操作人, 为 `null` 时为 [Bot] 操作
|
||||||
*/
|
*/
|
||||||
@ -67,14 +67,14 @@ interface OperableEvent : GroupEvent {
|
|||||||
/**
|
/**
|
||||||
* 是否由 [Bot] 操作
|
* 是否由 [Bot] 操作
|
||||||
*/
|
*/
|
||||||
val OperableEvent.isByBot: Boolean get() = operator == null
|
val GroupOperableEvent.isByBot: Boolean get() = operator == null
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当操作人为 [Member] 时获取这个 [Member],
|
* 当操作人为 [Member] 时获取这个 [Member],
|
||||||
* 当操作人为 [Bot] 时获取 [Group.botAsMember]
|
* 当操作人为 [Bot] 时获取 [Group.botAsMember]
|
||||||
*/
|
*/
|
||||||
@UseExperimental(MiraiExperimentalAPI::class)
|
@UseExperimental(MiraiExperimentalAPI::class)
|
||||||
val OperableEvent.operatorOrBot: Member
|
val GroupOperableEvent.operatorOrBot: Member
|
||||||
get() = this.operator ?: this.group.botAsMember
|
get() = this.operator ?: this.group.botAsMember
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user