tg-to-obj

Make a telegram api dict update to obj.


License
MIT
Install
pip install tg-to-obj==1.0.0

Documentation

{ Telegram api To Object }

Parser telegram API BOT updates to object.


Install

  • Pip pip install tg-to-obj

  • Git Clone: git clone https://github.com/francis-taylor/TgToObj/ && cd TgToObg && python setup.py install

Basic use

I will be using the Amanobot framework to receive api updates.

import amanobot
import tg_to_obj

bot = amanobot.Bot('1111560977:AAGUffJO2TEw49v81bsPbtWXKR4mYVejvuA')

for i in bot.get_updates():
  print("Input:", tg_to_obj.Make(msgs).update_type) ## get the type of update

the field from has been changed to from_user, as it is a python obj declared by default.