From 1d007b1b60dca755cd5b75e45a23bbf05bfefc3b Mon Sep 17 00:00:00 2001 From: Trainer Jono Date: Sat, 12 Oct 2019 02:10:21 +0800 Subject: [PATCH] Fix typos in examples (#1537) --- examples/deeplinking.py | 2 +- examples/echobot2.py | 4 ++-- examples/inlinebot.py | 4 ++-- examples/inlinekeyboard2.py | 8 ++++---- examples/paymentbot.py | 4 ++-- examples/timerbot.py | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/examples/deeplinking.py b/examples/deeplinking.py index 05e0a82d9..f10083490 100644 --- a/examples/deeplinking.py +++ b/examples/deeplinking.py @@ -30,7 +30,7 @@ logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s logger = logging.getLogger(__name__) -# Define constants the will allow us to reuse the deep-linking parameters. +# Define constants that will allow us to reuse the deep-linking parameters. CHECK_THIS_OUT = 'check-this-out' USING_ENTITIES = 'using-entities-here' SO_COOL = 'so-cool' diff --git a/examples/echobot2.py b/examples/echobot2.py index 2d0b1a623..7bc381918 100644 --- a/examples/echobot2.py +++ b/examples/echobot2.py @@ -26,8 +26,8 @@ logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s logger = logging.getLogger(__name__) -# Define a few command handlers. These usually take the two arguments bot and -# update. Error handlers also receive the raised TelegramError object in error. +# Define a few command handlers. These usually take the two arguments update and +# context. Error handlers also receive the raised TelegramError object in error. def start(update, context): """Send a message when the command /start is issued.""" update.message.reply_text('Hi!') diff --git a/examples/inlinebot.py b/examples/inlinebot.py index 86aea01a1..e1b38945e 100644 --- a/examples/inlinebot.py +++ b/examples/inlinebot.py @@ -27,8 +27,8 @@ logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s logger = logging.getLogger(__name__) -# Define a few command handlers. These usually take the two arguments bot and -# update. Error handlers also receive the raised TelegramError object in error. +# Define a few command handlers. These usually take the two arguments update and +# context. Error handlers also receive the raised TelegramError object in error. def start(update, context): """Send a message when the command /start is issued.""" update.message.reply_text('Hi!') diff --git a/examples/inlinekeyboard2.py b/examples/inlinekeyboard2.py index 656784dc6..b81eaa17d 100644 --- a/examples/inlinekeyboard2.py +++ b/examples/inlinekeyboard2.py @@ -36,7 +36,7 @@ def start(update, context): # Build InlineKeyboard where each button has a displayed text # and a string as callback_data # The keyboard is a list of button rows, where each row is in turn - # a list (henc `[[...]]`). + # a list (hence `[[...]]`). keyboard = [ [InlineKeyboardButton("1", callback_data=str(ONE)), InlineKeyboardButton("2", callback_data=str(TWO))] @@ -47,7 +47,7 @@ def start(update, context): "Start handler, Choose a route", reply_markup=reply_markup ) - # Tell CosversationHandler that we're in State `FIRST` now + # Tell ConversationHandler that we're in state `FIRST` now return FIRST @@ -173,7 +173,7 @@ def main(): dp = updater.dispatcher # Setup conversation handler with the states FIRST and SECOND - # Use the pattern parameter to pass CallbackQueryies with specific + # Use the pattern parameter to pass CallbackQueries with specific # data pattern to the corresponding handlers. # ^ means "start of line/string" # $ means "end of line/string" @@ -191,7 +191,7 @@ def main(): fallbacks=[CommandHandler('start', start)] ) - # Add conversationhandler to dispatcher it will be used for handling + # Add ConversationHandler to dispatcher that will be used for handling # updates dp.add_handler(conv_handler) diff --git a/examples/paymentbot.py b/examples/paymentbot.py index 5a8e55657..229f87e32 100644 --- a/examples/paymentbot.py +++ b/examples/paymentbot.py @@ -103,9 +103,9 @@ def precheckout_callback(update, context): query.answer(ok=True) -# finally, after contacting to the payment provider... +# finally, after contacting the payment provider... def successful_payment_callback(update, context): - # do something after successful receive of payment? + # do something after successfully receiving payment? update.message.reply_text("Thank you for your payment!") diff --git a/examples/timerbot.py b/examples/timerbot.py index 7808269fe..8cb777dc5 100644 --- a/examples/timerbot.py +++ b/examples/timerbot.py @@ -29,8 +29,8 @@ logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s logger = logging.getLogger(__name__) -# Define a few command handlers. These usually take the two arguments bot and -# update. Error handlers also receive the raised TelegramError object in error. +# Define a few command handlers. These usually take the two arguments update and +# context. Error handlers also receive the raised TelegramError object in error. def start(update, context): update.message.reply_text('Hi! Use /set to set a timer')