def listener(messages):
 for m in messages:
  if (m.content_type == 'text'):
   print ((((str(m.chat.first_name) + ' [') + str(m.chat.id)) + ']: ') + m.text)

def listener ( messages ) : for m in messages : if ( m . content_type == 'text' ) : print ( ( ( ( str ( m . chat . first_name ) + ' [' ) + str ( m . chat . id ) ) + ']: ' ) + m . text )
wrapper that create a queuelistener .