BuildingTelegram Bots Develop Bots in 12 Programming Languages using the Telegram Bot API Nicolas Modrzyk Building TelegramBotsDevelop Bots in12 Programming Languagesusing the Telegram Bot APINicolas ModrzykBuilding Telegram Bots: Develop Bots in 12 Programming Languages usingthe Telegram Bot API Nicolas Modrzyk Tokyo, Tokyo, Japan ISBN-13 (pbk): 978-1-4842-4196-7 ISBN-13 (electronic): 978-1-4842-4197-4 https://doi.org/10.1007/978-1-4842-4197-4 Library of Congress Control Number: 2018965498 Copyright 2019 by Nicolas Modrzyk This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image, we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. While the advice and information in this book are believed to be true and accurate at the date of publication, neither the author nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made.
The publisher makes no warranty, express or implied, with respect to the material contained herein. Managing Director, Apress Media LLC: Welmoed Spahr Acquisitions Editor: Nikhil Karkal Development Editor: Matthew Moodie Coordinating Editor: Divya Modi Cover designed by eStudioCalamar Cover image designed by Freepik (www.freepik.com) Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science+Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation. For information on translations, please e-mail rights@apress.com, or visit www.apress.com/ rights-permissions.
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales web page at www.apress.com/bulk-sales. Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the books product page, located at www.apress.com/978-1-4842-4196-7. For more detailed information, please visit www.apress.com/source-code. Printed on acid-free paper Table of Contents iii Table of Con T T able of Con enT en s iv Table of Con T T able of Con enTs v Table of Con T T able of Con enT en s vi Table of Con T T able of Con enTs vii Table of Con T T able of Con enT en s viii About the AuthorNicolas Modrzyk has more than 15 years of IT experience in Asia, Europe, and the United States and is currently CTO of an international consulting company in Tokyo, Japan.
He is the author of four other published books, mostly focused on the Clojure language and expressive code. When not bringing new ideas to customers, he spends time with his two fantastic daughters, Mei and Manon, and playing live music internationally. ix About the Technical ReviewersDushyant Rathore is currently working as a firmware engineer with Western Digital. His experience includes full-stack web development, machine learning, decentralized applications, and others. Dushyant has worked on several kinds of projects related to IoT, chatbots, web sites, scrapers, command line tools, and machine learning projects, among others, at various startups. He has participated in national and international hackathons and has won a few of them.
He is a big cloud computing enthusiast. Sham Satyaprasad has been a full-stack software developer for more than four years, having completed a masters degree in embedded systems from Manipal University. He prides himself on writing highly efficient, readable, and maintainable code and strongly believes that coding is an art as much as it is science. Sham has recently developed a keen interest in NLP, ML, and data science and has been busy wrapping his head around these topics. xi Acknowledgments Its been yet another typing race to get this book out on time and beat the odds. Divya and Nikhil, thank you so much for teaming up again.
Im really looking forward to our next collaboration! I received support from so many people that it would take another book just to write the list of names. Nevertheless Thank you to my sister, Emily, my brother, Gregor, Mum and Dad, family, cousins, uncles, aunts, friends, Abe-san, Sawada-san, Gucci, Marshall, Momo, my soulmate Sachiko, soccer friends (I would break a knee for you), the Irish crew still enjoying Guinness (one more for me!), the awesome people in America (who always find the LPs Im missing), Chris and the Biners, the French team thats always there to support me, even without being asked, and the people deep in my heart, for your never- ending support. I could not have finished this without you. I appreciate you all so much. And, of course, thank you to my two wonderful daughters, Mei and Manon, for keeping up and always doing your best, even during hard times. xiii IntroductionWith a hundred ways to do a dozen things, why not try it all? Julian Casablancas Have you ever wondered how you could accomplish more by doing less, how you could have a sort of double who does all the work while you enjoy some cool beachside or spend more outdoor time with your beautiful children? I always have. xiii IntroductionWith a hundred ways to do a dozen things, why not try it all? Julian Casablancas Have you ever wondered how you could accomplish more by doing less, how you could have a sort of double who does all the work while you enjoy some cool beachside or spend more outdoor time with your beautiful children? I always have.
I am a big fan of the Telegram chat platform. Lets call it a platform, because it is more than a simple chat service with which you can stay in touch with people who matter to you most. It also enables you to think in ways you havent before. For example, living in Tokyo, you always care about what time the last train home is going to depart. I guess most people in big cities around the globe probably have that same concern. Checking the clock only every so often can result in a terrible and/or expensive taxi ride, so I started wanting something that automatically offered me a bunch of options to get home.
Next page