Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update botan.py #108

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update botan.py #108

wants to merge 1 commit into from

Conversation

spontanurlaub
Copy link

@spontanurlaub spontanurlaub commented Jan 2, 2018

Class to store the botan_token, message_wrapper for python-telegram-bot.

Hello,

I created a class to store the botan_token for further use. It's now possible to initialize this class at the beginning of the program and use it in the whole program, without entering the botan_token again.

I also added the decorator for functions that handle python-telegram-bot updates. Example code for that:

`from botan import Botan
from telegram.ext import Updater, MessageHandler

updater = Updater("telegram_token")
botan = Botan("botan_token")

@botan.track_message
def echo(bot, update):
update.message.reply_text(update.message.text)

updater.dispatcher.add_handler(...)
...`

I hope I can help!

Best regards,

Jannik

Class to store the botan_token, message_wrapper for python-telegram-bot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant