The chat messages that arrive when certain events occur.
        The most useful ones are CHAT_MESSAGE_RUNE_PICKUP,
        CHAT_MESSAGE_RUNE_BOTTLE, CHAT_MESSAGE_GLYPH_USED,
        CHAT_MESSAGE_TOWER_KILL
765973
def parse_dota_um(self, event):
        
        if event.type == dota_usermessages_pb2.CHAT_MESSAGE_AEGIS:
            self.aegis.append((self.tick, event.playerid_1))
998349
def messages(request, year=None, month=None, day=None,
             template="gnotty/messages.html"):
    

    query = request.REQUEST.get("q")
    prev_url, next_url = None, None
    messages = IRCMessage.objects.all()
    if hide_joins_and_leaves(request):
        messages = messages.filter(join_or_leave=False)
    if query:
        search = Q(message__icontains=query) | Q(nickname__icontains=query)
        messages = messages.filter(search).order_by("-message_time")
    elif year and month and day:
        messages = messages.filter(message_time__year=year,
                                   message_time__month=month,
                                   message_time__day=day)
        day_delta = timedelta(days=1)
        this_date = date(int(year), int(month), int(day))
        prev_date = this_date - day_delta
        next_date = this_date + day_delta
        prev_url = reverse("gnotty_day", args=prev_date.timetuple()[:3])
        next_url = reverse("gnotty_day", args=next_date.timetuple()[:3])
    else:
        return redirect("gnotty_year", year=datetime.now().year)

    context = dict(settings)
    context["messages"] = messages
    context["prev_url"] = prev_url
    context["next_url"] = next_url
    return render(request, template, context)
449222
def getMessage(self):
        
        if isinstance(self.msg, numpy.ndarray):
            msg = self.array2string(self.msg)
        else:
            msg = str(self.msg)
        if self.args:
            a2s = self.array2string
            if isinstance(self.args, Dict):
                args = {k: (a2s(v) if isinstance(v, numpy.ndarray) else v)
                        for (k, v) in self.args.items()}
            elif isinstance(self.args, Sequence):
                args = tuple((a2s(a) if isinstance(a, numpy.ndarray) else a)
                             for a in self.args)
            else:
                raise TypeError("Unexpected input '%s' with type '%s'" % (self.args,
                                                                          type(self.args)))
            msg = msg % args
        return msg
1021450
function onMessage(message) {
    if (message.type != "utf8") return

    DEBUGMSG("recv: " + message.utf8Data)
    message = JSON.parse(message.utf8Data)

    if      (message.type == "request")  session.onRequest(channel, message)
    else if (message.type == "response") session.onResponse(channel, message)
    else if (message.type == "event")    session.onEvent(channel, message)
  }
109229
def notify(self, message):
        
        for regex, handler in self.dispatch.items():
            match = re.search(regex, message)
            if match:
                handler = getattr(self, handler)
                return handler(match)
630695
def _got_message(self, uid, text):
        
        #TODO: use try
        e = Event(uid, E_MESSAGE, text)
        self.queue.put_nowait(e)

        self.controllers[uid][2] = time.time()
364466
def on_message(self, con, event):
        """"""
        msg_type = event.getType()
        nick = event.getFrom().getResource()
        from_jid = event.getFrom().getStripped()
        body = event.getBody()

        if msg_type == 'chat' and body is None:
            return

        logger.debug('msg_type[%s] from[%s] nick[%s] body[%s]' % (msg_type, from_jid, nick, body,))

        sender = filter(lambda m: m['JID'] == from_jid, self.params['MEMBERS'])

        should_process = msg_type in ['message', 'chat', None] and body is not None and len(sender) == 1
        if not should_process: return
        sender = sender[0]

        try:
            for p in self.command_patterns:
                reg, cmd = p
                m = reg.match(body)
                if m:
                    logger.info('pattern matched for bot command \'%s\'' % (cmd,))
                    function = getattr(self, str(cmd), None)
                    if function:
                        return function(sender, body, m)

            words = body.split(' ')
            cmd, args = words[0], words[1:]
            if cmd and cmd[0] == '/':
                cmd = cmd[1:]
                command_handler = getattr(self, 'do_'+cmd, None)
                if command_handler:
                    return command_handler(sender, body, args)

            broadcast_body = '[%s] %s' % (sender['NICK'], body,)
            return self.broadcast(broadcast_body, exclude=(sender,))
        except:
            logger.exception('Error handling message [%s] from [%s]' % (body, sender['JID']))
113928
def messages
      result = []
      seen = {}
      descriptors.each do |d|
        dm = d.messages
        dm.delete_if do |m|
          delete = seen[m.name]
          seen[m.name] = true
          delete
        end
        result.concat dm
      end
      result.sort!
    end
1355917
def _get_chat(self) -> Dict:
        

        if 'callback_query' in self._update:
            query = self._update['callback_query']
            if 'message' in query:
                return query['message']['chat']
            else:
                return {'id': query['chat_instance']}
        elif 'inline_query' in self._update:
            return patch_dict(
                self._update['inline_query']['from'],
                is_inline_query=True,
            )
        elif 'message' in self._update:
            return self._update['message']['chat']
231587
def on_messages(self, msg_list):
        
        self.stats.on_pack_recv(len(msg_list))

        for msg in msg_list:
            if self.state == OPEN:
                self.conn.on_message(msg)
922417
async def message_handler(self, event):
        """"""

        # Note that message_handler is called when a Telegram update occurs
        # and an event is created. Telegram may not always send information
        # about the ``.sender`` or the ``.chat``, so if you *really* want it
        # you should use ``get_chat()`` and ``get_sender()`` while working
        # with events. Since they are methods, you know they may make an API
        # call, which can be expensive.
        chat = await event.get_chat()
        if event.is_group:
            if event.out:
                sprint('>> sent "{}" to chat {}'.format(
                    event.text, get_display_name(chat)
                ))
            else:
                sprint('<< {} @ {} sent "{}"'.format(
                    get_display_name(await event.get_sender()),
                    get_display_name(chat),
                    event.text
                ))
        else:
            if event.out:
                sprint('>> "{}" to user {}'.format(
                    event.text, get_display_name(chat)
                ))
            else:
                sprint('<< {} sent "{}"'.format(
                    get_display_name(chat), event.text
                ))
1349585
function webSocketReceivedMessage (msg) {
          lastMessageTimestamp = OT.$.now();

          if (onMessage) {
            if (msg.type !== OT.Rumor.MessageType.PONG) {
              onMessage(msg);
            }
          }
        }
718739
function(params, callback) {
        /**
         * Callback for QB.chat.message.list()
         * @param {Object} error - The error object
         * @param {Object} messages - The messages object.
         * @callback listMessageCallback
         * */

        this.service.ajax({
            url: Utils.getUrl(MESSAGES_API_URL),
            data: params
        }, callback);
    }
505957
def get_messages(chat_id):
    """"""

    mark_seen = request.args.get('mark_seen', True)

    chat = g.driver.get_chat_from_id(chat_id)
    msgs = list(g.driver.get_all_messages_in_chat(chat))

    for msg in msgs:
        print(msg.id)

    if mark_seen:
        for msg in msgs:
            try:
                msg.chat.send_seen()
            except:
                pass
    
    return jsonify(msgs)
690778
def __on_message(self, msg):
        
        msgtype = msg['type']
        msgfrom = msg['from']
        if msgtype == 'groupchat':
            # MUC Room chat
            if self._nick == msgfrom.resource:
                # Loopback message
                return
        elif msgtype not in ('normal', 'chat'):
            # Ignore non-chat messages
            return

        # Callback
        self.__callback(msg)
440272
def messages(self):
        
        if self._messages is None:
            self._messages = MessageList(self._version, session_sid=self._solution['sid'], )
        return self._messages
94887
def _parse_lobby_chat(self, messages, source, timestamp):
        """"""
        for message in messages:
            if message.message_length == 0:
                continue
            chat = ChatMessage(message.message, timestamp, self._players(), source=source)
            self._parse_chat(chat)