MCPcopy Index your code
hub / github.com/wechaty/python-wechaty / add

Method add

src/wechaty/user/tag.py:83–97  ·  view source on GitHub ↗

add tag to contact or favorite :param to: :return:

(self, to: Union[Contact, Favorite])

Source from the content-addressed store, hash-verified

81 raise WechatyOperationError('target param is required to be Contact or Favorite object')
82
83 async def add(self, to: Union[Contact, Favorite]) -> None:
84 """
85 add tag to contact or favorite
86 :param to:
87 :return:
88 """
89 log.info('add tag to %s', str(to))
90 if isinstance(to, Contact):
91 await self.puppet.tag_contact_add(
92 tag_id=self.tag_id, contact_id=to.contact_id
93 )
94 elif isinstance(to, Favorite):
95 # TODO -> tag_favorite_add not implement
96 pass
97 # self.puppet.tag_favorite_add(self.tag_id, to)
98
99 def remove(self, source: Union[Contact, Favorite]) -> None:
100 """

Callers 5

login_listenerMethod · 0.45
ready_listenerMethod · 0.45
existMethod · 0.45
on_messageMethod · 0.45
on_friendshipMethod · 0.45

Calls 1

tag_contact_addMethod · 0.80

Tested by

no test coverage detected