[][src]Module mirai::message::single

Single Message is the element of MessageChain, when you want to send a message, you need to construct them.

SingleMessage

SingleMessage is the element of MessageChain, it has many variants:

  • Source: It contains a message-id and timestamp, but in common you don't need to use it, it only returns from the server.
  • Plain: It contains plain text, [Plain] message is common, and most frequently uses.
  • Quote: It is similar to [Source] variant, only returns from the server. It means this message quoted another message.
  • At: You can use [At] variant when you want this message notice somebody, the [display] property is how this [At] message displays.
  • AtAll: This message can only be received from a group.
  • Face: A face (aka expression) message element, if you want to construct it, you need provide at least one of [face_id] or [name].
  • Image | FlashImage: [Image] and [FlashImage] are similar, they both send an image message, but [FlashImage] has a time limitation. Both of them have three property: [image_id], [url] and [path], [image_id] is the id of an image which saved in Tencent server, [url] is a url that points to an image, [path] is a path that points to an image in the server. They also have priority, [image_id] > [url] > [path].
  • Xml | Json | App | Poke: These message are not very commonly used, you can see this for more information.

Enums

SingleMessage