class Message extends AnyRef
wrap MessagePayload
- Since
2020-06-02
- Alphabetic
- By Inheritance
- Message
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Message(messageId: String)(implicit resolver: PuppetResolver)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
age: Long
Returns the message age in seconds.
Returns the message age in seconds.
For example, the message is sent at time
8:43:01
, and when we received it in Wechaty, the time is8:43:15
, then the age() will return8:43:15 - 8:43:01 = 14 (seconds)
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- def conversation: Conversation
-
def
date: Date
Message sent date
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def forward(to: Conversation): Unit
- def from: Contact
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def mentionList: Array[Contact]
- def mentionSelf(): Boolean
- def mentionText(): String
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- lazy val payload: MessagePayload
- def recall(): Boolean
- def room: Option[Room]
- def say(mp: MiniProgram): Message
- def say(urlLink: UrlLink): Message
- def say(resourceBox: ResourceBox): Message
- def say(contact: Contact): Message
- def say(text: String): Message
- def self(): Boolean
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- def talker: Contact
- def text: String
- def to: Contact
-
def
toContact(): Contact
Get Share Card of the Message Extract the Contact Card from the Message, and encapsulate it into Contact class > Tips: This function is depending on the Puppet Implementation, see [puppet-compatible-table](https://github.com/wechaty/wechaty/wiki/Puppet#3-puppet-compatible-table)
- def toImage(): Image
- def toMiniProgram(): MiniProgram
- def toRecalled: Message
-
def
toResourceBox(): ResourceBox
Extract the Media File from the Message, and put it into the FileBox.
Extract the Media File from the Message, and put it into the FileBox. > Tips: This function is depending on the Puppet Implementation, see [puppet-compatible-table](https://github.com/wechaty/wechaty/wiki/Puppet#3-puppet-compatible-table)
Save media file from a message const fileBox = await message.toFileBox() const fileName = fileBox.name fileBox.toFile(fileName)
Example: -
def
toString(): String
- Definition Classes
- Message → AnyRef → Any
- def toUrlLink(): UrlLink
- def type: Type
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()