July 30, 2015

Telegram Bots & Stickers

TL;DR: Links to bots and stickers at the bottom of this post.

Telegram is a chatting app similar to Whatsapp but synced between your phone, tablet, laptop and whatever other device you have.

Telegram recently came up with support for developers to create bots, functionally similar to IRC bots. In short, bots help you to do things through the chatting app.

I first came up with a toy bot that returns a random number to get used to the Telegram Bot API. The workflow is simple:

  1. Request the Bot API for a list of messages/updates that you have yet to process
  2. Parse the messages/updates
  3. Perform a corresponding action
  4. Request the Bot API to return a reply

Once I got used to this workflow, I refactored the entire code for the toy bot to support a structure where steps 2 and 3 can be easily switched out. Code is on my github repo telegrambot.

Bots:

  1. Meetup Bot
  2. ksami_bot (toy bot)

Stickers:

  1. Crayon Pop
  2. AoA Mina
  3. SNSD Taeyeon
  4. One Piece - Chopper
  5. ksami
- ksami
Tags: