TestMessageEvent

open class TestMessageEvent(var id: ID = UUID.random(), var bot: Bot = TestBot(), var authorId: ID = UUID.random(), var messageContent: MessageContent = TestMessageContent(), var onReplyText: (String) -> TestMessageReceipt = { TestMessageReceipt() }, var onReplyMessage: (Message) -> TestMessageReceipt = { TestMessageReceipt() }, var onReplyMessageContent: (MessageContent) -> TestMessageReceipt = { TestMessageReceipt() }) : MessageEvent, BaseTestEvent(source)

用于测试的 MessageEvent 实现

Constructors

Link copied to clipboard
constructor(id: ID = UUID.random(), bot: Bot = TestBot(), authorId: ID = UUID.random(), messageContent: MessageContent = TestMessageContent(), onReplyText: (String) -> TestMessageReceipt = { TestMessageReceipt() }, onReplyMessage: (Message) -> TestMessageReceipt = { TestMessageReceipt() }, onReplyMessageContent: (MessageContent) -> TestMessageReceipt = { TestMessageReceipt() })

Properties

Link copied to clipboard
open override var authorId: ID
Link copied to clipboard
open override var bot: Bot
Link copied to clipboard
open override var id: ID
Link copied to clipboard
open override var messageContent: MessageContent
Link copied to clipboard
Link copied to clipboard

Inherited properties

Link copied to clipboard
open override val component: Component
Link copied to clipboard
abstract val time: Timestamp

Functions

Link copied to clipboard
open suspend override fun reply(text: String): TestMessageReceipt
open suspend override fun reply(message: Message): TestMessageReceipt
open suspend override fun reply(messageContent: MessageContent): TestMessageReceipt