mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-01-10 20:12:52 +01:00
updating example to V12 (#1579)
This commit is contained in:
parent
6fddb49af5
commit
8cdb20a85a
1 changed files with 3 additions and 3 deletions
|
@ -21,7 +21,7 @@ logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def msg(bot, update):
|
def msg(update, context):
|
||||||
# If we received any passport data
|
# If we received any passport data
|
||||||
passport_data = update.message.passport_data
|
passport_data = update.message.passport_data
|
||||||
if passport_data:
|
if passport_data:
|
||||||
|
@ -77,9 +77,9 @@ def msg(bot, update):
|
||||||
actual_file.download()
|
actual_file.download()
|
||||||
|
|
||||||
|
|
||||||
def error(bot, update, error):
|
def error(update, context):
|
||||||
"""Log Errors caused by Updates."""
|
"""Log Errors caused by Updates."""
|
||||||
logger.warning('Update "%s" caused error "%s"', update, error)
|
logger.warning('Update "%s" caused error "%s"', update, context.error)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
Loading…
Reference in a new issue