Marbaloo Telegram 0.1.0 | GitLocker.com Product

marbaloo_telegram 0.1.0

Last updated:

0 purchases

marbaloo_telegram 0.1.0 Image
marbaloo_telegram 0.1.0 Images

Free

Languages

Categories

Add to Cart

Description:

marbaloo telegram 0.1.0

python-telegram-bot support for cherrypy.

Installation
pip install marbaloo_telegram


Usage
For the simple way you can just send anything supported by python-telegram-bot,
# app.py
import marbaloo_telegram
import cherrypy

marbaloo_telegram.Plugin(cherrypy.engine, 'TOKEN').subscribe()
cherrypy.tools.telegram = marbaloo_telegram.Tool()


class Root(object):
@cherrypy.expose
def index(self):
bot = cherrypy.request.telegram_dp.bot
message = bot.sendMessage(text='TestMessage!', chat_id='38855883')
return message.text

root_path = os.path.dirname(__file__)
cherrypy.quickstart(Root(), '/', {
'/': {
'tools.telegram.on': True,
}
})
But if you want to use more interactive interface,
you can get bot dispatcher from plugin and define your telegram controller after cherrypy.engine.start,

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product: (if this is empty don't purchase this product)

Customer Reviews

There are no reviews.