lectio

Telegram Bot with Go

Contents

Go

Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.

image

The Go programming language is an open source project to make programmers more productive.

Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It’s a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language.

Tour of Go

An interactive introduction to Go in three sections. The first section covers basic syntax and data structures; the second discusses methods and interfaces; and the third introduces Go’s concurrency primitives. Each section concludes with a few exercises so you can practice what you’ve learned. You can take the tour online or install it locally.

Telebot

Telebot is a bot framework for Telegram Bot API. This package provides the best of its kind API for command routing, inline query requests and keyboards, as well as callbacks. Some of the strong sides of telebot are:

All the methods of telebot API are extremely easy to memorize and get used to. Also, consider Telebot a highload-ready solution.

Azure SDK for Go

azure-sdk-for-go provides Go packages for managing and using Azure services. It officially supports the last two major releases of Go.

Most packages in the SDK are generated from Azure API specs using Azure/autorest.go and Azure/autorest. These generated packages depend on the HTTP client implemented at Azure/go-autorest.

Other Azure Go Packages

Azure provides several other packages for using services from Go, listed below. If a package you need isn’t available please open an issue and let us know.

Service Import Path/Repo
Storage - Blobs github.com/Azure/azure-storage-blob-go
Storage - Files github.com/Azure/azure-storage-file-go
Storage - Queues github.com/Azure/azure-storage-queue-go
Service Bus github.com/Azure/azure-service-bus-go
Event Hubs github.com/Azure/azure-event-hubs-go
Application Insights github.com/Microsoft/ApplicationInsights-go

Demo

The repository in the demos folder is organized following the Standard Go Project Layout.

A simple demo for a Go telegram bot.

References

Agenda

  1. Presentation :clock12: (00:00)
  2. Introduction
  3. Azure Cognitive Services :clock3: 15:00
  4. Telegram Bot with Go
  5. Vision :clock1: (01:00)
  6. Language :clock130: (01:30)
  7. Decision
  8. Q&A (01:55)