MCPcopy
hub / github.com/wechaty/wechaty / type

Method type

src/user/message.ts:634–639  ·  view source on GitHub ↗

* Get the type from the message. * > Tips: MessageType is Enum here. * - MessageType.Unknown * - MessageType.Attachment * - MessageType.Audio * - MessageType.Contact * - MessageType.Emoticon * - MessageType.Image

()

Source from the content-addressed store, hash-verified

632 * }
633 */
634 public type (): MessageType {
635 if (!this.payload) {
636 throw new Error('no payload')
637 }
638 return this.payload.type || MessageType.Unknown
639 }
640
641 /**
642 * Check if a message is sent by self.

Callers 8

toStringMethod · 0.95
toRecalledMethod · 0.95
mentionListMethod · 0.95
toFileBoxMethod · 0.95
toImageMethod · 0.95
toContactMethod · 0.95
toUrlLinkMethod · 0.95
toMiniProgramMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected