@classmethod<EOL><INDENT>def from_rtm(cls, raw_event: MutableMapping) -> "<STR_LIT>":<DEDENT>
if raw_event["<STR_LIT:type>"].startswith("<STR_LIT:message>"):<EOL><INDENT>return Message(raw_event)<EOL><DEDENT>else:<EOL><INDENT>return Event(raw_event)<EOL><DEDENT>
Create an event with data coming from the RTM API.

If the event type is a message a :class:`slack.events.Message` is returned.

Args:
    raw_event: JSON decoded data from the RTM API

Returns:
    :class:`slack.events.Event` or :class:`slack.events.Message`