mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-06 09:00:14 +08:00
Fix At.followedBy
This commit is contained in:
parent
397861500f
commit
fe8ed44ef2
@ -17,6 +17,8 @@ import net.mamoe.mirai.utils.MiraiInternalAPI
|
||||
|
||||
/**
|
||||
* At 一个人. 只能发送给一个群.
|
||||
*
|
||||
* @see AtAll 全体成员
|
||||
*/
|
||||
class At @MiraiInternalAPI constructor(val target: Long, val display: String) : Message {
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
@ -33,10 +35,10 @@ class At @MiraiInternalAPI constructor(val target: Long, val display: String) :
|
||||
// 自动为消息补充 " "
|
||||
|
||||
override fun followedBy(tail: Message): MessageChain {
|
||||
if(tail is PlainText && !tail.stringValue.startsWith(' ')){
|
||||
return super.followedBy(PlainText(" ")) + tail
|
||||
if(tail is PlainText && tail.stringValue.startsWith(' ')){
|
||||
return super.followedBy(tail)
|
||||
}
|
||||
return super.followedBy(tail)
|
||||
return super.followedBy(PlainText(" ")) + tail
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user