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

Method exist

src/wechaty/utils/async_helper.py:43–55  ·  view source on GitHub ↗

exist if the message has been emitted Args: message_id (str): the identifier of message Returns: bool: if the message is the first message

(self, message_id: str)

Source from the content-addressed store, hash-verified

41 self.max_size: int = 100000
42
43 def exist(self, message_id: str) -> bool:
44 """exist if the message has been emitted
45
46 Args:
47 message_id (str): the identifier of message
48
49 Returns:
50 bool: if the message is the first message
51 """
52 if message_id in self.ids:
53 return True
54 self.ids.add(message_id)
55 return False
56
57 @classmethod
58 def instance(cls) -> SingleIdContainer:

Callers 3

message_listenerMethod · 0.80
wrapperFunction · 0.80
test_single_id_containerFunction · 0.80

Calls 1

addMethod · 0.45

Tested by 1

test_single_id_containerFunction · 0.64