mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-09 18:00:33 +08:00
Add toString override
This commit is contained in:
parent
192594896e
commit
3a47e2e255
@ -80,6 +80,8 @@ interface Message {
|
|||||||
else MessageChainImpl(this, tail)
|
else MessageChainImpl(this, tail)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun toString(): String
|
||||||
|
|
||||||
operator fun plus(another: Message): MessageChain = this.followedBy(another)
|
operator fun plus(another: Message): MessageChain = this.followedBy(another)
|
||||||
operator fun plus(another: String): MessageChain = this.followedBy(another.toString().toMessage())
|
operator fun plus(another: String): MessageChain = this.followedBy(another.toString().toMessage())
|
||||||
// `+ ""` will be resolved to `plus(String)` instead of `plus(CharSeq)`
|
// `+ ""` will be resolved to `plus(String)` instead of `plus(CharSeq)`
|
||||||
|
@ -32,6 +32,8 @@ interface MessageChain : Message, MutableList<Message> {
|
|||||||
this.plusAssign(plain.toMessage())
|
this.plusAssign(plain.toMessage())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun toString(): String
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取第一个类型为 [key] 的 [Message] 实例
|
* 获取第一个类型为 [key] 的 [Message] 实例
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user