code: def register_for_quick_chat(queue_holder, called_func, quit_event):
      
  
      def threaded_func(chat_queue, called_func, quit_event):
          while not quit_event.is_set():
              try:
                  next_message = chat_queue.get(timeout=0.1)
                  index, team, chat = next_message
                  called_func(index, team, chat)
              except queue.Empty:
                  pass
              except EOFError as e:
                  # Something else is shutting down - we can no longer communicate.
                  get_logger('chats').debug('quick_chat queue terminated. %s', e)
                  return
  
      thread = Thread(
          target=threaded_func,
          args=(queue_holder["input"], called_func, quit_event),
          daemon=True,
      )
      thread.start()
docs: Registers a function to be called anytime this queue gets a quick chat.
      :param queue_holder:  This holds the queues for the bots
      :param called_func: This is the function that is called when a quick chat is received
      :param quit_event: This event will be set when rlbot is trying to shut down
      :return: The newly created thread.