Returns True if this message is an Event of one of the specified types.
(self, *event)
| 479 | return key in self.payload |
| 480 | |
| 481 | def is_event(self, *event): |
| 482 | """Returns True if this message is an Event of one of the specified types.""" |
| 483 | if not isinstance(self, Event): |
| 484 | return False |
| 485 | return event == () or self.event in event |
| 486 | |
| 487 | def is_request(self, *command): |
| 488 | """Returns True if this message is a Request of one of the specified types.""" |