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

Method user_self

src/wechaty/wechaty.py:818–834  ·  view source on GitHub ↗

get user self Args: None Examples: >>> from wechaty import Wechaty >>> bot = Wechaty() >>> contact = bot.user_self() Returns: ContactSelf: user self

(self)

Source from the content-addressed store, hash-verified

816 log.info('wechaty has been stopped gracefully!')
817
818 def user_self(self) -> ContactSelf:
819 """
820 get user self
821 Args:
822 None
823 Examples:
824 >>> from wechaty import Wechaty
825 >>> bot = Wechaty()
826 >>> contact = bot.user_self()
827 Returns:
828 ContactSelf: user self
829 """
830 user_id = self.puppet.self_id()
831 user = self.ContactSelf.load(user_id)
832 # cast Contact -> ContactSelf
833 user = cast(ContactSelf, user)
834 return user
835
836 def self(self) -> ContactSelf:
837 """

Callers 5

selfMethod · 0.95
topicMethod · 0.80
is_selfMethod · 0.80
is_selfMethod · 0.80
mention_selfMethod · 0.80

Calls 2

self_idMethod · 0.80
loadMethod · 0.45

Tested by

no test coverage detected