mirai-core / net.mamoe.mirai.message.data / PokeMessage

PokeMessage

@SinceMirai("0.31.0") data class PokeMessage : HummerMessage

戳一戳. 可以发送给好友或群.

See Also

Types

Types

Types

companion object Types : Key<PokeMessage>

Properties

id

val id: Int

name

仅 mirai, 显示的名称

val name: String

type

val type: Int

Functions

contentToString

转为最接近官方格式的字符串. 如 At(member) + "test" 将转为 "@群名片 test".

fun contentToString(): String

toString

得到包含 mirai 消息元素代码的, 易读的字符串. 如 At(member) + "test" 将转为 "[mirai:at:qqId]test"

fun toString(): String

Companion Object Properties

BaoBeiQiu

宝贝球 (SVIP)

val BaoBeiQiu: PokeMessage

FangDaZhao

放大招

val FangDaZhao: PokeMessage

GouYin

勾引

val GouYin: PokeMessage

Heartbroken

心碎

val Heartbroken: PokeMessage

JieYin

结印 (SVIP)

val JieYin: PokeMessage

Like

点赞

val Like: PokeMessage

Poke

戳一戳

val Poke: PokeMessage

QiaoMen

敲门 (SVIP)

val QiaoMen: PokeMessage

RangNiPi

让你皮 (SVIP)

val RangNiPi: PokeMessage

Rose

玫瑰花 (SVIP)

val Rose: PokeMessage

ShouLei

手雷 (SVIP)

val ShouLei: PokeMessage

ShowLove

比心

val ShowLove: PokeMessage

SixSixSix

666

val SixSixSix: PokeMessage

SuiPing

碎屏 (SVIP)

val SuiPing: PokeMessage

typeName

Key 指代的 Message 类型名. 一般为 class.simpleName, 如 "QuoteReply", "PlainText"

val typeName: String

values

所有类型数组

val values: Array<PokeMessage>

ZhaoHuanShu

召唤术 (SVIP)

val ZhaoHuanShu: PokeMessage

ZhuaYiXia

抓一下 (SVIP)

val ZhuaYiXia: PokeMessage

Extension Functions

flatten

扁平化 Message

fun Message.flatten(): Sequence<SingleMessage>

isContentEmpty

判断消息内容是否为空.

fun Message.isContentEmpty(): Boolean

isContentNotEmpty

fun Message.isContentNotEmpty(): Boolean

isNotPlain

fun Message.isNotPlain(): Boolean

isNotPlain2

fun Message.isNotPlain2(): Boolean

isPlain

fun Message.isPlain(): Boolean

isPlain2

fun Message.isPlain2(): Boolean

repeat

fun Message.repeat(count: Int): MessageChain

repeat2

fun Message.repeat2(count: Int): MessageChain

sendTo

suspend fun <C : Contact> Message.sendTo(contact: C): MessageReceipt<C>

times

operator fun Message.times(count: Int): MessageChain

toForwardMessage

转换为 ForwardMessage

fun Message.toForwardMessage(sender: User, time: Int = currentTimeSeconds.toInt(), displayStrategy: DisplayStrategy = DisplayStrategy): ForwardMessage
fun Message.toForwardMessage(senderId: Long, senderName: String, time: Int = currentTimeSeconds.toInt(), displayStrategy: DisplayStrategy = DisplayStrategy): ForwardMessage