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)
| 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: |