ContentMessage

interface ContentMessage<T : MessageContent> : Message

Properties

chat
Link copied to clipboard
common
abstract val chat: Chat
content
Link copied to clipboard
common
abstract val content: T
date
Link copied to clipboard
common
abstract val date: DateTime
forwardable
Link copied to clipboard
common
abstract val forwardable: Boolean
hasProtectedContent
Link copied to clipboard
common
open val hasProtectedContent: Boolean
messageId
Link copied to clipboard
common
abstract val messageId: MessageIdentifier

Inheritors

CommonMessage
Link copied to clipboard

Extensions

parseCommandsWithParams
Link copied to clipboard
common
fun ContentMessage<TextContent>.parseCommandsWithParams(argsSeparator: Regex = defaultArgsSeparator): Map<String, Array<String>>

Parse commands and their args. Logic will find command, get all subsequent data as args until new command

requireWithContent
Link copied to clipboard
common
inline fun <T : MessageContent> ContentMessage<*>.requireWithContent(): ContentMessage<T>
withContent
Link copied to clipboard
common
inline fun <T : MessageContent> ContentMessage<*>.withContent(): ContentMessage<T>?