Packages

c

wechaty.user

Message

class Message extends AnyRef

wrap MessagePayload

Since

2020-06-02

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Message
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Message(messageId: String)(implicit resolver: PuppetResolver)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. 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 is 8:43:15, then the age() will return 8:43:15 - 8:43:01 = 14 (seconds)

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  7. def conversation: Conversation
  8. def date: Date

    Message sent date

  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def forward(to: Conversation): Unit
  13. def from: Contact
  14. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. def mentionList: Array[Contact]
  18. def mentionSelf(): Boolean
  19. def mentionText(): String
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. lazy val payload: MessagePayload
  24. def recall(): Boolean
  25. def room: Option[Room]
  26. def say(mp: MiniProgram): Message
  27. def say(urlLink: UrlLink): Message
  28. def say(resourceBox: ResourceBox): Message
  29. def say(contact: Contact): Message
  30. def say(text: String): Message
  31. def self(): Boolean
  32. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  33. def talker: Contact
  34. def text: String
  35. def to: Contact
  36. 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)

  37. def toImage(): Image
  38. def toMiniProgram(): MiniProgram
  39. def toRecalled: Message
  40. 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)

    Example:
    1. Save media file from a message const fileBox = await message.toFileBox() const fileName = fileBox.name fileBox.toFile(fileName)

  41. def toString(): String
    Definition Classes
    Message → AnyRef → Any
  42. def toUrlLink(): UrlLink
  43. def type: Type
  44. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped