MCPcopy
hub / github.com/wechaty/python-wechaty / add

Method add

src/wechaty/user/friendship.py:107–123  ·  view source on GitHub ↗

add friendship Args: contact: the contact to be added hello: the hello message Examples: >>> contact = Contact.load('contact_id') >>> await Friendship.add(contact, 'hello') Returns: None

(cls, contact: Contact, hello: str)

Source from the content-addressed store, hash-verified

105
106 @classmethod
107 async def add(cls, contact: Contact, hello: str) -> None:
108 """
109 add friendship
110
111 Args:
112 contact: the contact to be added
113 hello: the hello message
114 Examples:
115 >>> contact = Contact.load('contact_id')
116 >>> await Friendship.add(contact, 'hello')
117 Returns:
118 None
119 """
120 log.info('add() <%s, %s>', contact.contact_id, hello)
121 await cls.get_puppet().friendship_add(
122 contact_id=contact.contact_id, hello=hello
123 )
124
125 @classmethod
126 async def delete(cls, contact: Contact) -> None:

Callers

nothing calls this directly

Calls 2

friendship_addMethod · 0.80
get_puppetMethod · 0.80

Tested by

no test coverage detected