{"repo":"bot4s/telegram","free":true,"listed":false,"github":"https://github.com/bot4s/telegram","clone":"git clone https://github.com/bot4s/telegram.git","description":"Telegram Bot API Wrapper for Scala","language":"Scala","stars":432,"topics":["telegram-bot","telegram","telegram-api","telegram-bot-api","scala","telegram-bots","webhook","polling"],"license":"Apache-2.0","category":"chat-messaging","readme_excerpt":"Idiomatic Scala wrapper for the Telegram Bot API bot4s.telegram Simple, extensible, strongly-typed wrapper for the Telegram Bot API. Table of contents - Installation - Quickstart with scala-cli - Examples - Leaking bot tokens - Webhooks vs Polling - Payments - Games - Deployment - Running the examples - A note on implicits - Versioning - Authors - License Installation Since version 6.0.0 telegram-core and telegram-pekko are published for Scala 2.12, 2.13 and 3. Add to your build.sbt file: For Mill, add the dependencies to your build.mill module: Quickstart with scala-cli. Replace BOT TOKEN with your Telegram bot token. Examples Random bot (full example) Text to speech bot (full example) Calculator bot (using Webhooks) (full example) Check out the sample bots for more functionality. Leaking bot tokens Don't ever expose your bot's token. Hopefully GitGuardian got you covered and will warn you about exposed API keys. Webhooks vs. Polling Both methods are supported. (Long) Polling is bundled in the core artifact and it's by far the easiest method. Webhook support comes in the extra artifact based on pekko-http; requires a server, it won't work on your laptop. For a comprehensive reference check Marvin's Patent Pending Guide to All Things Webhook. Some webhook examples are available here and here (with self signed SSL certificate setup). Payments Payments are supported since version 3.0; refer to official payments documentation for details. I'll support developers willing to integ","default_branch":null,"files":null,"tree":[],"storefront":"/r/bot4s","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/bot4s/telegram/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}